I think his contract expired and he spent four seasons in Newcastle before moving to Saudi Arabia.
I doubt it's for the money, though, because that's something Newcastle can afford right ? I believe Maximin was already being surplus to requirement in the team to be very honest, if Newcastle have not been plagued with injuries after injuries this season, In my opinion they have multiple players that are pretty much better than Maximin, if you ask me, and then there is definitely a squad number of players control they might need to have had before the season, so why keep an heavy budget on your team if you don't think he'll be a getting any playing or is already surplus to requirement.
It's typical the same thing as asking why did Man City sold Gabriel Jesus, Sterling or Cole Palmer more so to an immediate rival, one the offer was too good to reject, and these players have multiple replacement already and their playing time weren't by any means guaranteed too, so it's decision that favors all parties involved, at least as of the time the decision were made, whether or not, it's come back to hunt them.