Plus, the Earth has life because the conditions are good.
Conditions have not made good with the purpose of the earth to hold life.
It's a coincidence, something that had to happen somewhere in an "infinite" universe with potentially "infinite" combinations of planets, their conditions, and their distance to its stars.
Probably there is another civilization 48548538452985 trillion light-years away (random number), talking about this too.