Dear Student,
The partition of India was carried out for range of factors. They followed the policy of divide and rule to maintain their rule in India. Initially Muslims were not in favour of separate Pakistan but in 1940s the demand started cropping up in the minds of Muslims for political gains. Hence it was the interest of both British and Muslims to partition India.
Regards