Depends on what you mean by "never allowed". If you mean in a worldly sense, then no parent, spouse, government or anyone can stop another from disbelieving in a faith and/or leaving a religion. Faith/beliefs are after all in one's heart and mind first, and no one can govern another's convictions and perceptions, though they maybe able to control another's actions via laws etc.

But even when it comes to actions,if you look around you, with an exception to a few Muslim countries(and these countries are lands no ex Muslims would ever bother to reside in by choice), apostates are not punished in any way, cos no one is really bothered.Even in countries like Qatar, UAE, etc no one cares to search out former Muslims and even ask them why they left the faith, specially if they are expats. And should you be in Non Muslim governed lands, then it goes without saying that no one can prevent you from leaving Islam at all!

But if you mean in a religious sense, then according to the Islamic belief, leaving Islam would then make your case between God and you, and it will be upon Him to decide your final and eternal consequence.