It's a matter of convenience.
A quick search tells me that normal human walking speed is around 5 km/h. Asking Google to convert the distance, 20 miles is around 32 km. That means it would take over 6 hours in your example to walk to the shops; almost everyone would prefer to take the car or a bus instead of wasting 6 hours in each direction.
Now suppose the person lives in a walkable, mixed-use neighborhood. Suppose also the shop she wants to walk to is 1 km from her house. The time used would be a bit more than 10 minutes, short enough that there's no real need to get a car or public transport.
There's also the matter of public transport itself. There isn't a bus stop in front of each building. Depending on where you live, you might walk 5-10 minutes to take the bus, then walk 5-10 minutes from the bus to your destination. That's also short enough to be tolerable, so you get people who don't even have a car, or who have a car but use it mostly for longer trips (or for when it's raining, which explains why the transit gets so bad even with a few drops of rain).