This makes more sense for small countries.
For example, I live in Canada and unless you life in the capital of the province everything is really far away.
A lot of people live in cheap apartment blocks of rural areas and it can be a walk of pretty much an hour to get to the groceries store. There is public transit but it's usually every few hours instead of a constant traffic, so you have to plan your entire day around it.
I do agree with your main point that public transit should be one of the main investment of a country.