Companies value the utility they get from Open Source projects more than they value the money they could make by selling proprietary software.
Hobbyist developers value the utility, recognition, or fun of hacking on software more than they value the functionality of pre-packaged proprietary software, so they devote time to working on Open Source.