There are a number of reasons why the Ottoman and Safavid rulers allowed religious toleration.
* Political expediency: The Ottoman and Safavid empires were vast and diverse, and their rulers knew that they could not afford to alienate their non-Muslim subjects. Persecuting non-Muslims would have led to unrest and rebellion, which could have threatened the stability of the empires.
* Economic pragmatism: The Ottoman and Safavid empires depended on the trade and commerce of their non-Muslim subjects. Persecuting non-Muslims would have disrupted this trade and commerce, which would have harmed the economies of the empires.
* Cultural curiosity: The Ottoman and Safavid rulers were interested in the cultures of their non-Muslim subjects. They often patronized non-Muslim artists and scholars, and they learned about their cultures and religions. This cultural curiosity helped to promote religious toleration.
As a result of these factors, the Ottoman and Safavid empires were relatively tolerant of non-Muslims. This tolerance allowed Christians, Jews, Zoroastrians, and other religious minorities to live freely and practice their religions in peace. Religious toleration had long been a tradition in the Muslim world, and the Ottoman and Safavid empires continued this tradition.