However, some other scholars are keen enough to distinguish. Allah is an Arabic word for God. In Persian it becomes Khuda. When Urdu was developing as a language, many of its words found their origin in Arabic and Persian. When the Arabic verse “Fi Amaan Allah” was translated in Urdu, it became Khuda Hafiz. Both meaning the same : “May you live in the bliss of Allah.” Over the period of time Khuda became the first choice for God in Urdu. Many poets also started using it in their verses.
Mufti Jenab Junnaid sahib from Indore says that Khuda is a Persian equivalent for Arabic Allah and Urdu has adopted it as it is. Indian Sufism had its roots in Iran. Iranian influence can easily be seen on Indian Urdu. But with time, there is a revolt against Persian influence and hence nowadays we can hear Allah Hafiz more often than Khuda Hafiz.
Mufti further tells that during Mughal era Urdu was considered the real language. It was being used more and more by common people, across sections. Even in Mughal courts, Arabic was being used little. Hence Aadab was given more preference to Salaam, both being salutations. A Shia-Sunnia angle too is being alleged here, as Iran is predominantly Shia and Arabic countries are predominantly Sunni, but scholars reject this notion. They say it is more to do with two different languages than two different sects of Islam.
As a matter of fact the word Khuda is used nowhere in Quran. Khuda is the word for Persian God and Muslims would rather prefer to say Allah. Nowadays they have sort of decided to stick with Allah Hafiz instead of Khuda Hafiz. However this deviation is not bereft of a political accent altogether. In 1978 when General Zia ul Haq took over the regime of Pakistan, he started pushing for better relations with Saudi Arabia as it was its chief exporter of Oil. Zia ul Haq changed the name of Layalpur as Faisalabaad on King Faisal and won Arabian admiration.
In 1979, two major events took place : 1) Soviet Red Army camped in Afghanistan and 2) Ayatollah Khomeini took over the regime in Iran. Both of these were red signals to America. In Iran Khomeini changed the law books to rewrite them in accordance with Shia Theology. Zia ul Haq had to prove himself an opponent of Iran to rise in the eyes of America and Saudi Arabia. Therefore during his regime the popular ethos of Pakistan shifted to Sunni sect and Ahmedias, Bohras, Qadiani Shias soon became marginalized. Zia ordered all media that from here onward they should pronounce Allah instead of Khuda. In 1979 Allah Hafiz was first heard on Pakistan Radio. It took some time to reach India but it is very much here now.