There aren’t actually many Muslim/Arab states in which alcohol is illegal. I’ve been to Jordan a few times and they all drink as if there’s no tomorrow… The same applies to Lebanon and others.
I thought that airlines flying into countries where booze is illegal were allowed to keep unsold alcohol (instead of throwing it away) but that it had to be locked away in a special compartment well before landing with one person (say the head steward) being the only keyholder. The authorities would then come and do their checks if they wanted to, and the airline would wait until the plane was away before unlocking the drinks.
Can’t remember where I heard this though… probably read it in a mag or something.