There are a handful of these companies out there. Collabora, KDAB, D. Richard Hipp's SQLite company, and if you're lenient enough you could also include companies that productize their open source package such as NextCloud or The Qt Company. Heck, Red Hat (sorry, IBM) regularly gets pulled in to improve software across their stack, kernel or otherwise.
You could also include non-profits like the Linux Foundation, Blender Foundation or (new!) Godot Foundation, which do the same thing but without having to disguise as consulting, because development of the software itself is important enough to the industry that can pool its resources by donating to the respective foundation.
Still only works for important enough packages. I don't think there's a way around that. An open source project generally has to provide massively outsized value so that a handful of developers can capture a fraction of that value for paid maintenance.
Speaking for KDAB, only a relatively small fraction of our overall revenue is paid work on open source codebases. We mostly get paid to work _with_ Free Software and to teach it to people. Living off of maintaining or improving Free Software is only sustainable for freelancers or small boutique companies. Even the big foundations don't fund all that much development, they mostly focus on governance, infrastructure and promotion. The Linux kernel is possibly an exception, in terms of feeding an appreciable number of people working on it professionally outside of a company directly selling it.
You could also include non-profits like the Linux Foundation, Blender Foundation or (new!) Godot Foundation, which do the same thing but without having to disguise as consulting, because development of the software itself is important enough to the industry that can pool its resources by donating to the respective foundation.
Still only works for important enough packages. I don't think there's a way around that. An open source project generally has to provide massively outsized value so that a handful of developers can capture a fraction of that value for paid maintenance.