You can certainly spend more, but on-prem/self-hosted, time is usually the limiting factor, either directly or through opportunity cost. Contrary to popular belief, time does not always equal money, if you need more storage and the blocker is that you need to build out an S3 equivalent (rather than just paying for S3), then you'll be blocked by hiring, by hardware lead times, etc.
I also don't think that every organisation that needs file storage must build a storage solution that should compete the reliabiltiy and features of S3. Most of the times you can get by just fine at fraction of the cost.
Take file storage for example. Going from one server, to one with backups, to N, to big-N, are all points of inflection where significant engineering is required for on-prem/self-hosted file storage. With a cloud solution none of these are inflection points, none require additional work, they only require additional money.
Assuming you have infinite time, you can just funnel money into things like hardware upgrades and hiring engineers to build these things, but if you don't assume infinite time, time is often as strong or even stronger a factor than money.
At my last company we had a bunch of servers in colo, and could not throw money at solving problems there. Getting a new machine took 2+ days and a bunch of emails, not an API call. We moved to the cloud mostly because the opportunity cost, i.e. the time spent by engineers on toil scaling things on physical machines, was higher than the monetary cost that we could pay on a cloud provider.
This won't be the same for everyone, but the point is that money is roughly the only consideration in cloud, but not the only consideration on-prem, at least when you discount common factors between the two.