This is just because of the way EASA treated B737 MAX grounding. They just stopped accepting flights with these aircraft into the EU airspace even for already airborne flights with valid flight plans.
For this company two flights were involved. On from Cape Verde ended up in Tunisia and one from Dubai in Ankara. Both of them were originally hoping to get to the EU airspace until the perceived misunderstanding clears - because flights already airborne and with valid flight plans should be allowed to finished their flights, right, that sounds logical ... not to EASA...
So these aircraft had to land outside EU, get to PAX to the hotels, fly other types of airplanes for them and ferry the MAXes empty home to LKPR.
Other airplanes of the same company became stranded out of EU because they were doing flights between two out-of-EU destinations at the time of the ban and had to wait for a day to be allowed to ferry home.