Islam is a religion in the same way a cake is flour.
Islam comes out of the 8th century when religion was intertwined with government. Remember that during this era, kings and princes had to go to Rome to be acknowledged by the Pope. It wasn’t that far back that Egyptian rulers were considered gods, as was Caesar. The difference is that western governments broke away from religion, setting government up as separate from a specific religious control whereas Islam was fundamentally enshrined as government in the Middle East. Saudi Arabia, Iran, Kuwait, Yemen, etc are all tied completely to Islam, with Islam being the rule of law. So Islam is government and exports that under Sharia to other countries.