Why would I ever need to sign such s thing? If I contribute to an open source project, isn’t it obvious that I agree to publish my code under whichever license the project is published under?
Often, the contributor license agreement says that you - the contributor - transfer the copyright of your contribution to the project/company.
This is used to get the community contributing to the project while making sure that the project can be turned into a proprietary project at anytime.
The copyright holder can decide about the license. As long as only one entity holds the copyright, this entity is free to change the license. This even works if the project is licensed under a copyleft license like the GNU Public License (GPL). Such projects might look like “open-source”. Fine, the source is open at the moment. But it might not be open anymore tomorrow.