Oxygen is a waste product of photosynthesis that occurs in plants.
The green plant use the sun's energy and convert carbon dioxide and water into simple sugars and oxygen. You can't say oxygen a waste product but a beneficial product which humans and animals use for healthy breathing.