Why do the modern day countries of Iran and Iraq have a majority of Shiite Muslims?

Traditional Answer

After Karbala tragedy most of Iranians and Iraqi Sunni Muslims converted to Shi'a.

Historical Answer

Iran did not become majority Shi'a until the 1400s and 1500s under the Safavid Dynasty which invested heavily in proselytizing Sunnis to become Shi'a. Iraq had maintained a large Shi'a population on account of the Karbala incident, but the majority of families that converted to Shi'a did so around the same time as those in Iran. However, Iran and Iraq have almost always been the most concentrated regions of Shi'a Islam even though numerous other dynasties such as the Fatimids in Egypt and the Idrissids in Morocco were also Shi'a.