Mahrez, who scored 78 goals and made 59 assists for City in a trophy-laden spell at the club, on Friday joined the Saudi Pro League side for a reported sum of 35 million euros plus five million in add-ons.
Asked if he had wanted Mahrez to remain at City, Guardiola told reporters: "Definitely. I enjoyed as a manager to be with him. I had a special relationship with him...
"Saudi Arabia has changed the market. A few months ago when Cristiano (Ronaldo) was the only one to go, no one thought this many top, top players would play in the Saudi league," the Spanish manager added, speaking before Sunday's pre-season friendly against Atletico Madrid.
"In the future there will be more and that's why clubs need to be aware of what is happening. Riyad got an incredible offer and that's why we could not say don't do it."
The Saudi Pro league has become an attractive destination for Europe-based players since Ronaldo moved to Al-Nassr in January, with Ballon d'Or winner Karim Benzema (35), World Cup winner N'Golo Kante (32) and ex-Liverpool captain Jordan Henderson (33) also moving to Saudi.
"They want to create a strong league and so far they are the league who can do it...," Guardiola said.
"Right now, the Saudi league, I don't know how long they will sustain it, but the feeling is that they will stay. The players want to take this experience to play in that league and they are able to do it."
City's first match of the 2023-24 domestic campaign after their pre-season tour is the Community Shield game against Arsenal on August 6th.