Most of what I've done on FOSS projects has been unpaid, either building a tool or some functionality that I need at the time - "scratching my own itch", as ESR puts it. This doesn't mean that it doesn't make me money. As a freelancer, the tool I build/improve today could help me land a project tomorrow or help me get an existing project done more quickly, either of which is good for my bank account.
Back when I was working as someone else's employee, there were also times when I developed code on the clock that would help with my job, or other employees' jobs, but my employer wasn't in the business of selling software anyhow, so they were willing to let me release it under a FOSS license.
Today, I offer clients a discount on work done for them which will be released under a FOSS license, in which case I would be getting paid directly for work on FOSS code. Nobody's actually taken me up on it yet, but a current client has asked whether certain parts of their project would be suitable for open sourcing, so they're clearly open to such arrangements and looking for an opportunity to get that discount.
Edited to add: Freelancing has not been kind to me in the six months since I originally posted this answer (too hard to find paying clients for my language of choice), so I have accepted a full-time job with the local university's library, where I will be helping to clean up their in-house collection management application so that it can be released under a FOSS license sometime next year.
So, yes, there are jobs out there where writing FOSS is the primary job responsibility. I suspect that they're mostly in the public sector or at educational institutions, but there are also some private corporations (like, say, Red Hat) where such jobs can be found.