Of course, if the open sourced project becomes wildly popular it's great for your CV, but that doesn't typically happen.
Also, just flinging the code out in the open isn't enough. The company needs to be a good steward of your open sourced contributions. At my last job I left a few reusable open source Django components which I thought were very nice (and others are using it), but nobody felt responsible to take care of the project, so it languished. Now it is several Django versions behind and has bug reports which aren't being fixed. This was rather disappointing to me. I had really expected better because my colleagues in general were typically pro open source. I'm not using Django anymore, and I'm not inclined to put any personal time into it to keep the project alive.