That's not true at all.
I'm from London, which has a pretty extensive subway system (we call it the tube). The only way you'll do a 12 mile* tube journey in 40 minutes in London is if you (i) live and work on the same subway line, and (ii) have <2 minutes' walk at each end. This is not true for 99% of people.
Sure, you could build more tube stations at great expense, to reduce the walking time, but more stops means more time stopped, which means more time spent in the tube.
I've lived in Beijing and Shanghai, and what I've written above, in reference to London, applies almost equally in those two cities.
*When I say '12 mile' above, I'm talking about the equivalent journey by road, not the 'as the crow flies' distance between two points, nor the distance the tube train travels.
So you always have to go into a hub (city center in Nottingham, London in England), and then walk & wait around for a new bus/train (or tube from station to station in London).
This significantly increases journey times to anywhere that's not the hub. Also the assholes charge £20 more for having the gall to go through London, even though that's precisely how they set the system up. So now to get to my home town I either have to get 4 trains outside of London, or 2 and a tube through London.
It's more economical and profitable for the bus/train companies, but costs everyone not going to the central hub a lot of time.
I would have liked going down to ~20 minutes but beyond that it's entering into diminishing returns territory & I'd much rather work fewer hours and/or from home instead.
Living right by work is optimal, but not always practical, so the runner-up of solid transit is a good alternative.