20-some years ago I bought a warranty for a used car I'd bought because it's exhaust manifolds were known to crack.
Sure enough, they did, and the warranty paid for replacements, minus the deductible.
Bottom line, I was ahead on the deal, and I dropped the warranty when it expired.
Maybe not my best ethical moment in retrospect, but I was in survival mode at the time, if that matters.
Karma's since been well-repaid...

I'd bet the cost of the warranty is calculated in similar fashion to insurance rates, and of course the less they pay out, the better their bottom line.
They may not be regulated as much as insurers, though.
Haven't bought a warranty for anything since, however.