The SDF-1 Macross was a military spaceship. But by accident they had to accommodate 75,000 civilians. Where did they get supplies like food for 75,000 persons who went aboard the SDF-1 Macross?
They got their supplies from Macross Island (which space-folded with them.)
Wikipedia plot summary for the original Japanese anime explains it better. ( https://en.m.wikipedia.org/wiki/Super_Dimension_Fortress_Macross )
The people from the Macross salvage everything they can, including the city surrounding the ship and its civilians (who have survived in special safety shelters, which were transported along intact), and attach two aircraft carriers to the ship.