I haven't dealt with hard drives in a decade. hashtag blessed. but more like hashtag priorities as there are plenty of things I didn't spend that extra few hundred dollars on.
Raspberry PI and a bit of plastic.
And if you want it to be quiet + cool your drives, that costs money. Not to mention the software — Is this bare metal or does it come with a base OS? Does the vendor offer driver support or are you stuck with ancient Debian?
What about manufacturing volume, is it 1000 units or 10 million units?
Those all will influence the price, especially for something fairly niche. ;)
I have found 3D printing very fruitful for all of my one-off enclosure needs. For larger things (i.e., 100 hard drives, not O(10) SSDs) I recommend looking into bending sheet metal. This is a technique that I just learned about and it's been eye-opening. Everything in the world is bent sheet metal. And the CAD skills you learn doing 3D printing translate nicely to sheet metal.
A few months later I picked one up used on Ebay for $120, and after using it for a few weeks, I can now report why these cost so much.
The amount of software that comes on this thing is absolutely mind blowing. I was able to set up a bidirectional sync to my cloud drive, differential backups, compressed folders for archival, and a backup to Glacier for off-site backup without writing a single line of code.
With a bit of additional digging into their package center, I found out I could install Docker & run GitLab on the NAS, along with a bunch of other self-hostable software.
I realize I could have probably built my own NAS and used FreeNAS for a fraction of the price of buying new, however the amount of time that would have spent configuring/debugging/setting up FreeNAS makes the vendor-purchased NAS a much better investment.
The manufacturers know that plain mechanical enclosures have very low margins so they implement features that are perceived-needs ( 'oh that sounds cool!' ) and crank the margins by hundreds of per cent.