Muslim-majority countries are going through political changes and including Islam as a source of policy. Some even claiming in their constitutions that Islamic law systems will form a partial basis of their government. This may puzzle some non-Muslims, who may not be aware of the political workings of Muslim-majority countries, or believe that Muslims are required to have entirely religious governments.
While there is some debate among Muslims about the role of religion in government, there is little true consensus, and the historical record shows numerous possibilities for Islamic law systems that include secular elements or reserve religious legislation for purely religious matters. It's important to understand how the role of religion in state affairs has changed over fourteen centuries of power struggles and debates, and how Islam's intellectual diversity began with a multi-ethnic community and expanded to a multi-ethnic global community.
In the very beginning, Islamic political vibrancy planted seeds for political diversity. The Prophet Muhammad (peace be upon him) was both a religious and political leader, but appointed no successor, and gave no explicit instructions for a governing system. This could have resulted in chaos, and several conflicts did arise. But when the dust cleared, it gave rise to a system for choosing a leader in which rested both religious and political authority using a system akin to the papal conclave.
Legislation was created with the help of a complex tradition of jurisprudence, wherein legal scholars would rule on cases, analyze prior cases, and draw from them legal maxims that married the essential concepts contained in Islamic source texts with lessons learned in working out just what those concepts would mean. But that is only a fraction of what is considered Islamic law.
The first famous case to test what Islamic law systems would mean in a world where Islam was considered new was a case in Bukhara. They had a system of long-term leases that challenged the prevailing Islamic legal opinions of the time. To terminate the leases would throw the local economy into chaos. To retain them as is would not only be an incomplete application of Islamic principles, but be a poor precedent to set.
So the leases were restructured somewhat, to allow for long-term renting while minimizing risk to the renter, but the jurisprudence on long-term leases was changed as a result. Not a total ban, but neither was it a blanket permission. Islamic law would continue to evolve and help Muslims through situations where they were encountering systems that Muslims had never dealt with before, like the long-term leases, and situations that were new to the entire world, such as issues with worship while orbiting the Earth.
Muslims have a faith tradition born on the cusp of antiquity and the medieval era, and still bears heavy traces of its ancient and medieval roots. But Islamic law systems did not pass that time in a vacuum- local custom and borrowings from other legal systems inform Islamic legal scholars today in forming new law for a new age.