It depends if you want a stock iMac or at BTO(build to order). BTO's you can only get from Apple online. For me I ordered my 2011 BTO iMac online and it was an easy process. I bought the Apple Care, which is great to have. You could buy it anywhere and still get Apple Care(3 year warranty).
It also depends if you want to buy online or at a retail store. If you buy from Apple, and you have an Apple retail store near you, you could take your iMac to the store to get replaced or fixed. Best Buy has the Geek squad.
For me, when I use to build my Windows Computers I would just buy parts and do warranty through the companies that made the parts.
For an iMac, for me, I have no worries buying directly from Apple and bringing it to the local Apple store for problems. My wife has a 24 inch iMac, and in the first six months the hard drive died. I brought it in to the Apple store and they replaced the hard drive with no extra cost and it was easy.
I would get it from Apple, but that is me. Plus I got a great discount from Apple do to my company gets a very good discount from Apple.