In the episode of "South Park" that features Elon Musk and SapceX, he explained why the company was built.
As the Earth is likely to be depleted, scientists are looking at the planet Mars.