It isn't. You can accept donations. You can charge for support/enhancement work, or for a managed service. You can also find a salaried job where your work is released under a Free and Open Source licence, such as Linux kernel development.
You're right that it's famously difficult to monetise Free and Open Source software, but there are a few examples of it happening.
> the original idea of open source: that it was the cool things you could build with code, not the code itself, that had value.
Perhaps I'm missing your point here, but as far as I know, there's nothing in the Open Source or Free Software movements that ever viewed FOSS primarily as the basis for interesting proprietary software.
> They've built things on FOSS code that never existed before, and most of them have contributed a lot of FOSS code back. But they haven't sold databases, reverse proxies, and key/value stores, right?
Red Hat might be the clearest counterexample here. If I understand correctly, their charge for their official builds, which I suppose is a way of charging for support.
You're right though that many of them go with a service model and don't publish the code. Amazon Aurora, for instance, or Google App Engine.