main difference is that a car might last you ten or fifteen years if you take good care of it, a gun will last many lifetimes and can be passed down through the family for generations.
While this is often the observed result, it's not due to inherent "quality" or time, alone. It's a matter of USE.
Everything mechanical wears with use. Cycles of operation. Mileage, Round Count, however you measure it.
Guns seem to last lifetimes, generations even, because with very rare exceptions, no one owner actually uses (shoots) a gun enough to wear it out.
Just to pick a number, lets say 100,000. Lets say that at 100,000miles your car is worn out, and at 100,000 rounds your pistol is worn out. (not any relation to reality, just a number to work with)
A person might take 10 years to put 100,000 miles on their car. Another person might do it in 2-3 years. It might take several generations of shooters to put 100,000 rounds through a gun. Or it might take high volume competition shooter just a single year.
I remember an article from the later 80s (or so maybe the early 90s..) forget who the interview was with, but he was one of the very top "action" shooters, and he said he wore out 3 1911s a year in practice. (and worn out means the FRAME is worn out, to the point it can't be fixed).
The interviewer asked how much he shot in practice every year, and he said "about 80,000". Interviewer askes "80,000 rounds?", and he said, "no, dollars..." think about that, 80,000 DOLLARS worth of ammunition is quite a bit..
Nothing wrong with getting high end guns at all, just don't confuse a high price with high quality. They aren't always the same thing.