Life would be so much easier if we had a crystal ball, wouldn't it?
With cars, it's really a crapshoot. You do your best to buy good ones (would never buy a sketchy one, or from a sketchy place) and hope for the best.
I've bought warranties, but never actually had to use one. I knew it was a gamble, but it gave me some peace of mind.
AAA has after market warranties that I think are pretty good. If there are problems, you have AAA to back you up, and that's huge. Additionally, you can either pay for it all at once, or they'll break it up into 12 or 15 payments, for convenience.
That said, we have paid a TON of money in older [college commuting] car repairs over the past few years - in one case, more than we originally paid for the car. (Never had warranties for these, and they were good cars for a very long time, until they got up there in mileage and started having problems.) Seems we couldn't get out of the shop for under $2000; oftentimes even more. Just done with that.
Bought two nice used cars this year and got the warranties through the dealership with each. Yeah, they give me the lines they were giving me a special deal because of xyz, etc. I didn't care. I looked at the cost in comparison to what we'd paid in car repairs, and it was peanuts. I'm hoping we won't need a lot of repairs (bought Toyotas for the first time), but it helps me sleep at night knowing if something goes wrong, it's not going to cost us a small fortune - especially for DD (who is paying the bills but I had to cosign) for her first car purchase.
We just need to get through one more year of college with our two kids and we'll be sleeping like babies!