The events that led to the division of British India into India and Pakistan was a method the British had to secure how independence would take place. The British government had a system of political control of “divide and rule” and because of that, this strategy was perfect.
Muslims were 25% of British India’s population, therefore a religious minority. They were afraid of losing protection as the independence of India got closer.
With the approach of WWII, things got even worse, since the British took India into the war without consultation of the population or the legislative, this caused even more pressure for independence and the creation of a separate state.
The separation between India and Pakistan caused riots, mass casualties, a wave of migration - Muslims headed towards Pakistan and Hindus and Sikhs headed into India -, and a death toll of 2 million people.