All drives can fail of course, but some are more prone to it.
Swapping system and data is a daunting task for some users, and not too classy for Apple to punt on the hardest step.
You will need to have the original Mac OS installation discs that were shipped with your iMac in order to reinstall your operating system, other applications, and any backed up data after your hard drive is replaced.
I recommend cloning to an external drive (preferably two) instead— far faster and much lower risk of screwup. And Apple could have done this for users, which would have been a class act.
Mac Pro = value, iMac = storm cloud
As a professional, I use my computer every day (7 X 12 typically). The only sensible choice for a professional who depends on their gear is a Mac Pro.
An iMac is a disaster waiting to happen— if I want to upgrade the drive, or the drive dies, I cannot be down for 5-10 days waiting for Apple to fix it. Which means I would have to buy two of them, neither of which supports the memory I need, the extra drives I need or the PCIe cards I need. The iMac is a very poor medium and long investment for a professional. It is a poor value in this sense, even though it “costs less”.
With a Mac Pro, a bad drive is a 5 minute swap. Over and done with.