This always is a question that developers or freelancers who work in “free” and “open source projects”, how take advantage from their works. Below, I mention couple of sources that they could make money.
1- First of all, in recent years, freelancing websites are growing fast and freelancers could take projects from there and make some money. Imagine that couple of freelancers claimed to do a project. You think who will win the competition and take the project??!! Of course project owners prefer to out-source projects to someone who has a portfolio with some open source project.
2- There are many developers and software engineers which worked in companies for years and built their resume and there are some others who worked as freelancers and also worked in “open source projects”. As much as an open source project is bigger, the potential advantage could be huge. Imagine developers who developed some popular python libraries or some frameworks in other languages. If they send million dollar proposal for getting grant from Silicon Valley huge companies or other institutes and research centers, the chance to win the grant is much more for them than engineers that just worked for companies in years.
3- If a company needs a software or web platform with specified details and the foundation of their needs is like your open source project, they most probably will come to you to customize your open source project and add features and etc. Most famous open source project in world is “Linux” operating system. The kernel of Linux is available for decades and all of distributions of Linux like Debian, Mint, Ubuntu and etc, are based on Linux kernel. It could be another source of income for open source community developers.
4- If after some years, a freelancer or open source developer, decide to work in a company, this time their open source project still could help significantly to win the competition with other applicants and get hired.
These are just some benefits that open source developers could make which sometimes is more than other developers who works in companies. So it would be highly recommended for junior programmers to participate in open source projects and publish their works in their portfolio or in github or etc.