Open source builds up that portfolio everyone wants to see, and working on a project provides mentors to help give new developers guidance.
Because there's no one to criticize you, and figuring something out on your own is a rewarding experience which gives you confidence.
Open source builds up that portfolio everyone wants to see
If you're into programming for the reason of "building a portfolio", then you're not into programming. You're into making money.
In a Free Software project, nobody forces you to cooperate with anyone. If you want, you can just release your program (or patch) and ignore all feedback. However, often enough you'll receive some very valuable feedback.
Also, you'll receive different kind of feedback depending on whether you start your own Free Software project, or contribute to an existing one. So I suggest to do both.