Because, much like their laptops and phones, the people who are buying them aren't "optimizing for reliability", but rather "showing off"
which turns out to be a pretty profitable venture from Apple's point of view
Nicely demonstrated by Tesla which might be a good car but you see people showing off their (distracting) big screen, (immature) self driving or (insecure) phone app
Or in the case of a natural disaster, not going anywhere on account of not being able to charge it ;)
I switched to Apple's ecosystem in 2017, I would say it is definitely more reliable than alternatives. Less freedom but also way less crashes or issues. And that is one of the reason that I am sticking with it.
Because in the medium-term future, cars are going to be all about software, and will be for entertainment almost as much as transport.
All the competition has no path to vertical integration.
Premium product, optimized integration, maximized profits, valuation to the stars.