Like most insurance, it's a good deal for the insurer and not a very good deal most of the insured. Also, like insurance, it can be a real checkbook saver if you have an expected and expensive problem.
Generally, the dealer keeps (profit) about 1/2 of the cost of the insurance. You can figure that the insurance company is betting that most people that buy your particular car, won't have claims in the insurance period that are over 1/2 of your insurance premium. It's all a gamble...with the house making a profit.
Also remember that you are likely paying double for some amount of time. Whatever warranty comes with the vehicle already covers you for that period of time (cost of this is built in to the vehicle price by the factory). The "extended" warranty extends your primary warranty. They like to call the extended warranty a 5-year warranty...but it isn't. I really extends your original warranty from 2 or 3 years to 5. You have to break down the cost by the actual period covered.
Say for example, you bought a brand new car from Ford (3 year/36 mile warranty) and they wanted to sell you their 5-year bumper-to-bumper warranty for $1000.
First you have to deduct the original warranty period for bumper to bumper coverage....lets say that's 1 year. Then the remaining manufacturers warranty covers drive train, etc for 2 more years (ending the 3 year period).
The "5-year" warranty is really only 4 years (years 2-5), with years 2 & 3 covered by the manufacturer for most main (expensive) problems. Really, the "5-year" warranty just extends your original warranty by 2 years (years 4 & 5).
Let's say the dealer keeps 1/2 the premium as profit. The insurance company gets $500. That's only $250 a year for year 4 and 5. Keep in mind, the insurance makes money, so most folks have fewer than $250 worth of claims in those years. You *probably* will too.
For me, I'd rather buy a decent car and pay whatever real repair expenses come my way. I figure on average, that I'll be paying less than $250 year for those 2 years....Paying $1000 to cover those possible expenses doesn't seem like a good deal to me. For some cars, I may not have any repair expenses. Of course, this does leave me exposed to unexpected catastrophe, but I figure, averaged over my lifetime of car ownership, I'll still come out ahead, even if I have to replace an engine or a transmission once or twice.
Hope this helps....