While subsidizes play a part, the biggest item is the 10lbs grain is a myth.
The first thing you need to understand is what you think of corn is actually just the corn kernel. Humans consume just the kernel. Now think about a corn plant and how much of the plant is the kernels.
A cow on the other hand, looks at that plant, the entire plant and basically, can eat everything down to the root. They eat the leaves, the cob, the kernels, the stalk. Farmers regularly harvest the entire field stripping it bare and shredding into sileage to feed to the cows.
Wheat, mmmm, humans love ground wheat. Again, what we think of as wheat is the seed. It’s actually a grass. We harvest the seed, send it to the mill to be ground and us it. We then harvest the rest of the plant, call it straw. We use that for pen bedding, sileage supplement and straight up winter feed filler.
Farmers can and do feed their cows silage. They let them eat grass (the lucky ones). They cut grass and call it hay. Along with a wide variety of plants that they don’t have to plant. The cows will eat shrubs, small tree branches and twigs.
All through the midwest, you’ll be cruising along looking at the roadside ditches, full of weeds and grass. The farmers cut them, bale them and feed them to the cows.
Most importantly, factory farm cows actually eat pigs, chickens and turkeys too. Don’t worry, they’re all rendered into a nice protein supplementing cow chow of stuff humans (non-subsistence level humans) wouldn’t eat.
The reality in the end is in US, cows are about 2 lbs of grain for each pound of marketable beef and that’s just because of the finishing process for taste and weight before slaughter. In the undeveloped world, they get less than a half pound.