How did Pakistanis become Muslim?
People of historic area of modern Pakistan were first introduced to Islam by Traders and Merchants:
Just like people of East Africa, Central Asia, East Asia, South-East Asia, People of South Asia were too introduced to the new religion through Arab merchants who conducted trade through the sea and also through the land. The early merchants influenced the local elite to some extent, but still, during this early trade period, Islam did not become the religion of common people. It was just seen as a religion of merchants and business-men of far-away lands.
Then came the armies:
Due to Indian subcontinent being rich and resourceful, it attracted Arab, Persian and Central Asian empires to expand here. These empires and their armies were Muslims and foreigners for the local people. No doubt these armies and empires succeeded but Islam as a religion never spread among the common or became a local religion during and due to these empires. Islam was seen as a religion of foreigners and invaders in the area of modern Pakistan.
Then came the Sufis:
They are the reason that people of historic area of Pakistan along with modern India became Muslim. These saints are the reason Islam became a local religion with common man practicing it. These saints were among the people kept influencing people. Sufi saints changed all the perception of Islam for the local people, Islam was now no longer seen as a religion of invaders and foreigners but as a socially acceptable way of living among the Indians.
Then came 1947:
Majority of people were Muslims in this area from the 18th century and when 1947 came, there was a clear majority of Muslims in this area. And also after the Partition of India and creation of Pakistan, many Indian Muslims migrated to Pakistan, that is how Pakistan become Muslims.