Extended warranties are very high margin - probably 65-75% for Applecare. For a vendor like Dell, they pay a variety of third party entities something like $25-40 per on-site visit, plus a commodity part. If you're handy, it is often cheaper to DIY.
With Apple, remember that they are masters of business process, supply chain and scale. You either hump the computer to the Apple store or do a depot repair. There's no man in the van. They put OEM parts or replace the unit and refurbish it in some industrial process. Apple makes of money on this, as the process maximizes utilization and minimizes loss - they are using their own staff or a smaller number of depot contractors, and push losses like shipping shrink to their contractors like FedEx.
But... remember that you have captive to a single supplier for most replacement parts, and replacement parts are a profit center for Apple. It's gross, but if you're not prepared to essentially replace the unit in year 2, and you need the device, you may be better off with AppleCare. Another factor is because Apple devices are unpredictably hit or miss for quality. My company had a defective keyboard MacBook that was replaced in full 7 times. There have been issues with batteries, de-lamination, and other things at various times that are a risk as well.
Personally, I buy AppleCare for Macs, but not for things that are more accessories like Apple TVs, iPads, etc. My kids iPad has a cracked screen stabilized with scotch tape.