Theory on how oxygen came to be on Earth