Doing charity work does not mean you don't expect to be paid for your regular work. Also, a lot of companies do pay devs to work on open source projects.
Open source isn't charity - just like playing non-professional sports isn't charity: the vast majority of participants see it as a hobby or social activity. A minority get paid, and a minority of the minority "break even", but vast majority are playing in self-organized leagues and pick up games, which are in no shape or form charities (even if the public can watch for free as a side-effect).