Because man and the animals move, they need higher rates of energy to live. That energy is supplied ultimately from the sun. We are used to seeing solar panels today which turn sunlight to energy. Compared to plants they are not very efficient. What God has exquisitely designed are the plants which are very efficient at converting light into energy. By man and the animals eating plants, or eating (after the Flood), animals, birds or fish, which themselves have eaten plants, the animal kingdom makes use of the very efficient plant kingdom. Sometimes one haa to go down the food-chain several steps to get to the plant/marine algae primary feeder.
Genesis breaks down land plants into 3 groups. Grasses, herbs and fruit trees (not necessarily what we think of fruit trees, all trees bear fruit of some kind.) This is a much wider categorisation of the plant kingdom than the modern divisions which are divided into some 260,000 species. What was of interest was their usage in relation to man.
It is clear from 1:29-30 and 9:3 that until the Flood man and animals were vegetarian. Provided the right balance is eaten, a vegetarian diet can be enjoyed by creatures that are normally associated with meat eating, including man.