Sure, you could close the streets to traffic. It is unsafe for pedestrians and motor vehicles to share a road. The pedestrians are soft and squishy and are inevitably the loser in any conflict.
Even poor countries can manage to build sidewalks and bike paths. Not having them is a choice to favor the motored over the unmotored.