In the grand scheme of things past a certain income level as a lump sum cost, they are not a large expense compared to housing. Nor is their monthly cost if financed particularly expensive next to the ongoing forever cost of insuring, fueling/charging, maintaining and garaging them. Nor is driving around in a relatively decent & recent model vs trying to keep an old model in working order with all the maintenance costs.
If you make 6 figures / live in a HCOL area, then the difference in a $25k or $40k or $50k car over the course of a 10 year life is kind of whatever. The insurance, maintenance and gas/charge over that 10 years probably adds up to $30k at a bare minimum. Your house probably cost $1M.
Even if you trade-in every 4~5 years at the end of the warranty period to minimize random maintenance costs, then maybe you eat like $3-4k/year of depreciation during ownership.. again not a huge number to have a reliable, safe, modern car at all times.
The real outsized car costs are incurred with car nerds who max out on having more cars than drivers, and/or "upgrading" every year, constantly eating max depreciation.
At the extreme- Few people are personally envious of Jeff Bezos having a nicer house/car/boat/vacation. But the way some people in my small middle class hometown react to someone who lives in the same town/hood, kids going to same school driving a $40k car when they drive a $25k car is kind of comically deranged.