True, in Pakistan, 97% of people are muslims. But Pakistan was not created to implement strict religious laws, as seen by our founder Quaid-e-Azam. However, one of the purposes of its creation certainly was that Muslims would have a total freedom to practice their religion. But both of these are different.
Pakistan was created since most Muslims in sub-continent had realized that, in a single country, they will be given discriminatory treatment and will be at a sheer disadvantage in many many ways as compared to the majority religion. This apprehension of muslims was proven to be true when Congress had a landslide victory in 1937 elections and formed her government in most provinces of India. The policies of Congress showed enough hostility to Muslims to make them realize that in a united country, they will be given unfair and unjust treatment. Here is a quote from Quaid-e-Azam,
[q]I wish the Musalmans all over India to observe Friday 22 December as the "Day of Deliverance" and thanksgiving as a mark of relief that the Congress regime has at last ceased to function. I hope that the provincial, district and primary Muslim Leagues all over India will hold public meetings and pass the resolution with such modification as they may be advised, and after
Jumma prayers offer prayers by way of thanksgiving for being delivered from the unjust Congress regime.[/q]
1937 elections were a chance for Congress to show everyone how it will run the country when India would be free from British rule. Muslim League got just a lukewarm response from Muslims in these elections but the way Congress implemented its policies, Muslims had a very strong realization that a separate country is probably a better choice in the future. This was the major reason that Muslim League that failed miserably in even Muslim majority provinces in 1937 elections, got majority of Muslim seats in the next elections.
Quaid-e-Azam, who used to be a great supporter of Hindu-Muslim friendship and united India, changed his stance after he had a very strong realization that his stance will hurt Muslims of India.
I am sure strong prejudices existed in both Muslims and Hindus against each other more than half a century ago but in a country full of strong prejudices, Muslims would have been the aggrieved group since they were a minority. I really think it was a very practical decision of our leaders at that time.