Really poor people can’t afford cars in the city, and yes, they can exist in the city because of public housing snd rent control. And it really isn’t the cars that are expensive, or even operating the cars, but the parking.
There are lots of middle class commuters who can’t afford to live in the city: they aren’t lucky enough to win the lottery with a rent controlled unit, and are too rich to live in public housing, but still too poor to live in housing of a standard they can tolerate in the city even if their job is there.
really-rich people don't have to work/commute, so prefer to live in countryside with gardens
really-poor people can't afford cars, and rich(=busy) cities usually have accomodations for them -- so they live inside busy cities