Average height isn’t the most useful statistic for this. A quarter of men are 6 feet or taller. When you factor in the fact that people aren’t likely to buy cars that their spouse can’t drive comfortably, there are an awful lot of people who just are never going to buy small cars. You could make a smallish car for tall people, but no one does.
The other issue is that modern cars are designed differently because of safety concerns—they have less interior space for the same exterior width. Plus kids have to use car seats until they are much older than they used too. Try putting 2 kids in car seats in a subcompact with a tallish driver with the seat pushed back.
Btw I’m 6’5” and it’s tough to even find an intermediate SUV where my knees fit comfortably.