It's insurance. You pay for car insurance, you pay for house insurance and you pay for health insurance.
Basically the warranty company thinks that, on average, you won't need any repairs. If they are wrong, they go out of business, so on average they are right. In that case they win.
However if anything does go wrong, it's likely to cost more than the insurance does, so in that case you win. It's pretty much like any insurance policy.
If you chose to go with an extended warranty plan then (a) Hope they don't go out of business before your camera breaks (that has happened with some companies) (b) Hope they do a good job of repairing whatever goes wrong (and hope that whatever goes wrong is covered by the warranty).
So it's a judgement call. On average it won't be worth it, but if you are an exception, it will!
You might find reading this useful -
http://en.wikipedia.org/wiki/Extended_warranty