Why was the hubble space telescope put into orbit around earth?

The Hubble telescope was put into space to take photos of the Earth and the moon