If the border was going to be drawn by the river why did they left the city and surrounding outside ?
From an earlier answer of mine
The reason why Stettin became Szczecin in 1945 is apparent when looking at the map. The core of the city, including its port facilities, was on the Western half of the Oder. Bisecting control over the mouth of the Oder would have been a clumsy arrangement and also give the Germans control over the river's flow to the Baltic, and by extension, the rest of the world.
A number of officials within the Polish provisional government, dominated by Polska Partia Robotnicza (the Polish Workers' Party/PPR- the main Polish communist party) stalwarts. Although the PPR was loyal to Moscow, its leadership also recognized that the immediate postwar period was a delicate time. Although the larger grand narrative of 1944-45 is of Allied leaders rearranging borders with certainty, things were much less clear on the ground in 1945. The PPR leadership knew from their connections to the Soviets that Stalin had decided to absorb a considerable chunk of Eastern Poland, but they were unsure exactly as to which parts. This made a number of PPR leaders anxious to push whatever advantage they could find in the Western border. PPR leader Władysław Gomułka in particular was anxious to acquire urban centers and their associated industries such as Breslau as well as Stettin in order to make up for the loss of the resources in Eastern Poland. The provisional Polish government thus became quite proactive in staking their turf inside these areas in what the PPR soon called the "recovered territories." Throughout early 1945, the PPR set up de facto municipal administrations in these administrative centers and acted as if the territorial concessions were an established fact.
Yet the territorial division was not as settled as the PPR claimed and the Soviets remained a vital bellwether the details of the final border. The Soviet military government twice dismissed the PPR's government in Stettin on 16 May and 12 June 1945 and had appointed a German KPD mayor, Erich Wiesner. The Polish and German municipal administrations co-existed in an uneasy partnership by mid-June, with the Soviet military government having the ultimate authority to decide the matter.
The decision in favor of Polish ownership of the city came in 5 July 1945 when Stalin at the Potsdam Conference stated unequivocally that Stettin was a Polish city. Why Stalin elected to favor the PPR's position is still a matter of conjecture. It may have been that having the region be Poland would have ensured that control of the Oder basin was in the hands of a loyal vassal and not an as yet politically-indeterminate future German state. It is also plausible that Stalin sensed that both the British and Americans were willing to finally accept the Soviet's ability to decide the Polish border and he elected to push for a maximum advantage. Another theory is that Stalin gave the Poles the port of Stettin to smooth over PPR feelings over the Soviet takeover of Königsberg. Unfortunately, as with much of Stalin's German policy from this period, the relevant archives are closed and even if opened, they might not reveal much as Stalin tended to make major decisions like these somewhat informally. The important thing is that while Stalin may have made up his mind on the Stettin question before Potsdam, this was unclear to many principles involved. Both Wiesner and the PPR pleaded their case for national retention of Stettin, and these pleas often framed how their respective claims over Stettin dovetailed with wider Soviet and communist interests.
The Stettin issue did not die after it became Szczecin at Potsdam, but lingered on as a cloud between the relations between Poland and the GDR for the first postwar decade. Although both the PPR and the SED castigated FRG attacks on the Oder-Neisse Line as fascist revanchism, the SED did make overtures to have Stettin and other areas returned to German control. Walter Ulbricht requested in 1950 that the GDR receive trade and economic concessions in Szczecin and a number of SED local leaders stressed that a patient foreign policy with their socialist Polish brothers would allow border revision in Germany's favor. But such overtures were a dead letter for the PPR. Not only did memories of German invasion and exploitation run long, the PPR staked much on using the "recovered territories"' infrastructure for the postwar Polish economy (here too, older ingrained national chauvinism transected communist ideology as internal SED correspondence often bemoaned Poles' inability to make these areas fruitful as they were under German administration). Ulbricht renewed his overtures for Szczecin again in 1956 when Gomułka returned to power after a brief period in internal political exile, but again this was a dead letter. By this time, the region had been sufficiently Polonized through settlement and the expulsion of Germans that to hand the city back to Germany would have entailed a similar pattern of resettlement. Gomułka was too politically vulnerable to stomach such and offer, nor was he personally inclined to countenance it.
Sources
Bessel, Richard. Germany 1945: From War to Peace. New York: Harper Collins Publishers, 2009.
Heitmann, Clemens. "Die Stettin-Frage: Die KPD, die Sowjetunion und die deutsch-polnische Grenze 1945." Zeitschrift für Ostmitteleuropa-Forschung 51, no. 1 (2002): 25-63.
MacDonogh, Giles. After the Reich: The Brutal History of the Allied Occupation. New York: Basic Books, 2007.