It may have adapted so it wouldn't get eaten and so it could escape the predators <span />
This statement is mostly false. While all organisms do share basic needs to sustain life, there is a wide variety of strategies employed to meet these needs. For example, while most plants receive nutrients from soil, some live in soils which do not fully meet their needs. Such plants sometimes kill and use animals in order to meet these needs (i.e. venus flytrap) or partner with bacteria that produce some of the nutrients they need (i.e legumes).
My answer will be because these characteristics intervene in the capture and assimilation of the food, having 4 general food behaviors: (1) detritivores, consume a lot of material from the bottom of the water source, (2) herbivores, who consume mostly plant components (filamentous algae and higher plants); (3) periphyton consumers, who are characterized by feeding on microalgae and microinvertebrates and (4) omnivores, in which they indistinctly feed on plant material as an animal of different origin.
True , your welcome! good luck!