To put the culture post another way: Muslim countries get Muslim laws.  

This isn’t just under democracy, but also dependent on raw ability to wield force, which is also impacted by how big and willing to fight the dominant cultural group is.

If you want a Liberal country, with Liberal laws, then either you need to have a Liberal culture, or someone strong enough and with enough backing to impose Liberal laws.  

If an imported culture gains ground until it replaces the dominant culture, then it will replace the dominant culture’s laws.