The answer is a complex one. Firstly, "population" transfers were conducted at the end of WWII in order to resettle Germans living outside its borders back to their home country. This was done by The Americans, British, French, and Soviets and is now considered a policy of "ethnic cleansing". This occurred for several reasons. One, ethnic Germans had always made up a proportion of the population in a number of territories surrounding Germany proper. Some areas contained a ethnic German majority in relation to the nationality of origin, such as the "Sudeten" Germans settled near the German border which was currently part of Czechoslovakia. Other areas contained a percentage of German heritage or were disputed territories with neighboring European powers. Examples are the Sudetenland, Alsace-Lorraine, or the Saarland. In addition Nazi Germany reclaimed previously stripped territory and acquired new lands to the East, and were utilized to enlarge the borders of the "Greater German Reich". Such areas are, Poland, including the previously held port of Gdansk or Danzig before it was lost after WWI. Second, the borders of Europe became very fluid throughout WWII for both German military units, but also German citizens moving eastward to work and support the war effort. Furthermore, large amounts of Slavic labor moved East to West providing much needed manpower for a number of defense factories and plants producing war materiel for the war effort. As a result of this, large ethnic and national populations were scattered throughout Eastern Europe and into Germany itself. At the conclusion of WWII, the defeated Germans were not welcome in areas re-claimed by host nations. In addition the victorious Allies also felt that all Germans should be removed from areas outside the new German borders and sent back to Germany to prevent future hostility stemming from ethnic Germans outside its borders.
Due to the nature of Germany's unconditional surrender, portions of Germany itself were given to neighboring countries such as Poland and France, along with the return of Austrian independence and sovereignty. Property and housing was a lottery for the most part. It depended on what part of Europe you were being expelled from and which victorious power was in charge of that area. For the most part property was "expropriated" by the occupying Allied Armies and given to refugees returning to their country of origin. One example is of a German woman living on a farm in Eastern Germany, she was ordered by Soviet Soldiers to leave her property and cede both the farm and house to a displaced Polish family. The Soviets acquired Eastern Poland early in the war in a joint attack with Nazi Germany. Interwar negotiations with the U.S. and Great Britain led to The Soviet Union maintaining possession of this region and its was subsequently integrated into the U.S.S.R. Compensation was almost never given to displaced Germans returning to Germany. As they were expelled from the various war-torn nations, most Germans faced ethnic and national based hatred, especially those associated with the Nazi Party and government functionaries. These expelles were not entitled to any lands or housing, usually forcibly removed from prior owners throughout the wartime period. Austria is probably one case where property could have been sold before returning to Germany as Austrian sympathies due to ethnic ties and the fact that Austria was considered unimportant in regards to future Allied plans for post-war Europe. Surveying of property or thorough assessment of property rights were largely ignored or done in an arbitrary fashion with no credible attempts to compensate the previous owner.
The Allied strategic bombing campaign in Western Europe coupled with intense fighting amongst German and Soviet throughout Eastern Europe combined to establish large swathes of destruction throughout Europe as a whole. Especially apparent in the Soviet Union, Britain, and Germany, the costs of war in terms of housing shortages were commonplace due to wanton violence and human depravity in wartime resulting in widespread damage to infrastructure and appalling human losses.
Heidefriedhof Memorial in Dresden, Germany
Wieviele starben? Wer kennt die Zahl? An deinen Wunden sieht man die Qual der Namenlosen, die hier verbrannt, im Höllenfeuer aus Menschenhand.
Dem Gedenken der Opfer des Luftangriffs
auf Dresden am 13-14 Februar 1945
How many died? Who knows the count? In your wounds one sees the agony of the nameless, who in here were conflagrated, in the hellfire made by the hands of man.
Commemoration of the victims of the air raid
on Dresden on 13-14 February 1945