The British were not financially capable of controlling India after WW2. Britain faced a lot of attacks which crippled theirits economy, like bombings in London and other economic strongholds during Germany's blitzkrieg. India was also being pummelled by the Japanese in the north eastern part of India with the help of INA commander, Subhash Chandra Bose.
After WW2, the British wanted help from itstheir colonies. They established the Indian Institute of Technology at Kharagpur so they cancould train Indian students to become engineers to help rebuild England. They wanted cheap labour to help rebuild England's economy, which was widely available in India, to help rebuild England's economy.
After international pressure from countries like the US and other powerful countries, and also pressure from the UN on the UK to grant freedom to all British colonies and, as well as independence movements led by Gandhi, Jai Prakash Narayan, Ram Manohar Lohia and many other eminent leaders which saw. There was a violent British response which showed the Indians see the true face of the English and made the people more devoted towards getting freedom andand also the change in government in the UK also helped India in gettingto get its freedom.