Internal storage is a huge thing. I have external storage attached to my 27" iMac, but it is not completely reliable (disks get ejected occasionally) and completely beats the purpose of an elegant desktop machine. So I really would like a machine with several drive spaces, especially if I can access them. I could have lived reasonably by upgrading the internal storage of my iMac, if there was any way for me to access it.
Graphics cards is another thing, but also the plain ability to clean fans when they start to clog up. The limitations of the iMac are amplified by Apple making the interior inaccessible.
Finally, while the screen of the iMac is great, I would like to have a larger screen.
So there are plenty of reasons still to have a bit more than the iMac can deliver.
I've had BlackMagic 1U SSD rack with a few drives connected to my 2013 iMac 27'' via Thunderbolt since like... 2013, and not a single time did they disconnect. It just works.
The rack is under the table so it doesn't "beat the purpose of an elegant desktop machine" either.
Lucky for you that you had no disconnects. But getting those limits which files you can put on the external disk if you need them available all the time. E.g. when my external disk gets disconnected, EyeTV stops working as its work directory is no longer existant.
Also, I don't see how having an additional large box (which by itself costs as much as many PCs) doesn't defeat the purpose of an all-in-one machine.
I am not arguing that the iMac shouldn't exist, I just listed a few points which can be better addressed with a proper desktop machine. Why I would be willing to spend quite a bit of money for that convenience.
Maybe check your power supply? I've supported Macs for a couple of decades and normally people have storage mounted for years without this kind of thing happening in the absence of some sort of hardware or environmental problem.
I wouldn't know what to check my power supply for and how I would go forward with that in an iMac. And this phenomenum isn't limited to the iMac, my Mac Mini had the same problem. Across different disks and interfaces. The disconnects are not constant, but an irregular thing. A colleague occasionally has the same problem, he even managed to get a local disk image unmounted when waking from sleep. So it might just be a MacOS problem.
With Thunderbolt3, there are more solutions for external storage, but still I find it odd consindering the price, that you don't get a desktop Mac where you can plug in some NVM SSDs or you get at least a few 2.5 inch bays.
Graphics cards is another thing, but also the plain ability to clean fans when they start to clog up. The limitations of the iMac are amplified by Apple making the interior inaccessible.
Finally, while the screen of the iMac is great, I would like to have a larger screen.
So there are plenty of reasons still to have a bit more than the iMac can deliver.