I have worked with contract developing in Open Source projects for big and small companies numerous times. I get contacted by the company that would like to see a particular feature get added to a project. If the feature suits the project, the contract pays well enough and I am able to take on the job, I would accept and do the job.
In more situations than not, the paying company would then ask for and prefer that I maintain all copyrights for all the changes and that I not make it publicly noticeable that this was in fact paid for by this company. For the casual outsider, it appears as if I just had a period of extra motivation and energy and one fine day delivered this feature.
Why companies would not want to use their sponsoring an Open Source project for marketing purposes and good will always baffle me. I have heard it explained by things like that the company does not want their competitors to so obviously spot that they use this project, but that seems like an odd and weak argument.