I don't know. When I was a kid in the 90ies, it was still common to see older men drive a car wearing a hat. On the other hand, if your car is really not high enough to wear a hat, is it really that inconvenient to take it off when you enter? Men also stopped wearing hats in countries where owning a car was the exception. This theory also implies that somehow, before the car, mobility with a hat on was universally possible. Try riding a bike with fedora. Or a horse.
My father used to curse men who drove while wearing a hat. The hat restricts your field of vision.
I feel like cramming yourself into a subway car with a fedora is equally unpleasant. At least in an automobile you can just put the hat in the passenger's seat or something.