Why not ?
I would never have any advantage (serious one) to the code I write and keep only for myself.
Then, open sourcing, I can meet new person, find new problem, and gain in knowledge.
There is then the point of "making a name": "Whooa he is the guy behind PUT-BIG-HOT-THING-HERE" is always a good motivation, plus it can land you on a good job.
And finally, yes, there is also the point of giving back to the community... I took so much from the Open Source that I need to give back at least my shitty code.