Sure the original fleets of Starships going out to mine these rocks would be dependent on dried foods from back home. But there's CHON in those asteroids - Carbon, Hydrogen, Oxygen, and Nitrogen. That can be mined and with enough solar power or even fusion if we have it by then, they'll be able to grow all the food they need. In dirt, that they increasingly make themselves. And these crops will have the perfect, tailor made climate, water, etc and be vastly more productive than anything out on a farm here on earth.
THEN there's futuristic stuff like this - which we should get an answer on in a few years.
Have you heard of Ferming? Think of it as electric food that bypasses photosynthesis. Electricity splits water and feeds hydrogen to bacteria - with a few fertilisers. Here's George Monbiot eating a pancake made from the stuff.
Lab-grown food is about to destroy farming – and save the planet | George Monbiot They claim it will scale up to grow protein cheaper than soybeans by 2025, and that it will cook all the proteins and fats and carbs we need, and even arrive in different flavours. They want to cook up an alternative kind of fish-finger with omega-3's, or something like a chicken nugget. It could replace livestock and wheat and corn farms. All that's required are much smaller gardens for fruit and veg and herbs and spices for flavour and texture woven into this factory stuff. It could be the biggest jump in human food since we invented farming 10,000 years ago!
Solar Foods - Wikipedia
The Chinese are working on another route - a chemical way to cook up sugary starches used for both food and cardboard etc. In keeping with the "Ferming" above, I call this one "Starching".
They sound like some gifts from Science Fiction. Worth keeping an eye on!
Here's a video of Ferming products.
If it can be mass produced in space and turned into yummy meat-pattie alternatives, or even just all the high protein pasta they need, imagine what it could do for world hunger here on earth?