Why did the CP of my Pokémon change after upgrading my storage?

It actually had nothing to do with you upgrading your storage. The way CP is calculated has been adjusted and it is now reflected in-game.

See this announcement:

We have made adjustments to the CP (Combat Power) of various Pokémon. Some Pokémon, such as Alakazam, Rhydon, and Gengar will have their CP increased. Others will have their CP lowered. These changes will allow a more balanced and competitive battling and training experience in Gyms. We will continue to adjust the CP going forward to improve the game balance when necessary.