Hi there!
It forms fecal waste. Fecal waste is made of whatever’s left after the large intestine absorbs the needed nutrients and minerals.
Hope this answers your question!
The gradual abundance of oxygen (by product of photosynthesis) made it possible for aerobic organisms to grow more and evolve.
Hope that helps!