Why were planets created that encircle other suns which are completely uninhabitable? If you were to propose that they were created because of the promise that the Creator made to Tzaddikim/Righteous people that they would each inhabit a world, they would not work since they are uninhabitable for many reasons. Why were they created, what is their purpose since there are more planets than there are stars?
This question is similar to your question about why there are atoms in other stars and why there are materials there that are also made up of atoms. These are the laws with which the Creator set into creation, therefore, they apply to all of creation equally. The pull of gravity that functions on Earth also must function equally on all inanimate objects in the universe.
See here: http://www.haemet.net/articles/god.htm