that looks to me like they fold in order to meet some height restriction to fit under a bridge or something, not in order to unload cargo?
this is the setup I'm talking about: https://en.wikipedia.org/wiki/Container_ship#%2Fmedia%2FFile%3AMAERSK_MC_KINNEY_M%C3%96LLER_=&_MARSEILLE_MAERSK_%2848694054418%29.jpg=
and you can see from the way the top deck is built, with or without the folding masts, that this ship is not designed to be unloaded like that.