I think in the end it comes down to whether you like mountains more than harbors. ;-)
Hamburg has its own charme with the harbor and the surrounding history of sailors, trade, red light districts, very old factories etc.
Munich is much more polished but also kind of crammed. Cars everywhere, lots of traffic in the streets, yes, parks also, but... it's different.
I like both cities and also beer from both cities. If you're not from Germany and decide to come over: Visit both of them and enjoy their uniqueness.