Overcrowding and sanitation are orthogonal problems to delivering goods to millions of people in a city. London for example was unsanitary because we didn't even have an understanding of germ theory at the time. People however didn't starve because no trucks where around to stock the shelves.