Why did the British rule India?

For cotton for their factories and to spread their empire and for raw matireal