@nprofile1q... Libraries can be solvable puzzles in a way that day-job business logic cannot. Puzzles are fun and rewarding even if they're time-consuming and frustrating sometimes.
For companies, the act of open-sourcing software is (in theory) an effort to reduce the cost. Heroku open sourced it's old router for apparently no reason. A competitor (windows focused PaaS) used it even. But when they found a bug and gave a good report, it was fixed. That was free labor.