and this was a part of their (cruel) punishment.
Nobody was like, "Mwahaha, now we will devide Germany into two countries as punishment for doing WWII." The Soviets had occupied the eastern half and the rest of the Allies had occupied the western half and so it was divided along those lines (what else were they going to do, start WWIII over it?). It wasn't because Germany "deserved" it, if anything, the country was treated generously for fear of it going to the other side, and there was an understanding that the harsh conditions imposed after WWI only contributed to Hitler's rise to power in the first place.
Those conditions lasted for like three years before the Marshall Plan went into effect.