It's basically a similiar inefficiency to feed animals to get protein.
The corn plant has to use a lot of energy input to keep it's own organism alive and growing compared to direct usage of sun power via solar panels.
Raising an animal with feeding and housing it all the time while it is growing also consumes so much more resources compared to directly planting cereals, vegetables and legumes for humans.