Plants need some oxygen, too. During the day, plants make oxygen. At night, plants don't make food or oxygen. They get oxygen from the air, just as animals do. Organisms depend on one another in other ways, too.
Cattle egrets are birds that spend their time following cattle.
Wherever the cattle go, the egrets follow. The cattle stir up insects and other small animals wherever they feed. The egrets follow behind the cattle to get food. The cattle aren't always helped by the egrets. They aren't always harmed, either.