Foot traffic was completely open until then even though the inner-German border was closed in 52. Why did they wait almost a decade?
This is a somewhat complicated issue in the border policy of the GDR was not following a single unified plan and the erection of the Berlin Wall was the culmination of a process that was highly contingent upon the events of the Cold War. Although Wilhelm Pieck's notes from a 1945 meeting between KPD heads and Stalin shows that the Soviet dictator expected a permanent division of Germany, postwar Soviet German policy often hemmed and hawed between accepting division and pushing for a unified Germany. This lack of direction and clarity from Moscow complicated a final settlement of the thorny issues of German occupation, one of which was the status of Berlin. The US did not help in this matter either, holding that the status of Berlin would be settled by a formal peace treaty between the Allies and Germany, while simultaneously promoting the FRG as a fully sovereign state and ensuring German division for the foreseeable future. A permanent German division would render the US position on final peace treaty impossible as it necessitated a singular German state to agree to the territorial revisions and formally end the war. The leaders of the two Germanys also contributed to the division. The nascent FRGs Hallstein Doctrine tried to erect a diplomatic cordon around the GDR and insisted that the FRG was the sole, legitimate German government. The ruling SED leadership in the GDR also pushed Soviet German policy and a hardline on Berlin. The SED leaders recognized their unpopularity among the German public and knew that a reunified Germany would end their monopoly on power, so the SED's position on the German question in the 1940s and early 50s mirrored that of the US: it maintained German unity was the desirable goal while ensuring that the GDR was a fully sovereign state, making that goal more elusive.
As a de facto division of Germany became the apparent status quo, the West's support of West Berlin became increasingly hard to justify. Both the US and the FRG seemed to be using double-speak when reaffirming their commitments to West Berlin while never really considering it formally part of the FRG state. The SED pressured the Soviets to put force on the West for an abandonment of Berlin so that a reunified city would be the new capital of the sovereign East German state. In 1958, Khrushchev split the difference in both the West's position and SED demands by proposing a formal peace treaty with the two Germanys and unified Berlin becoming a free city. But the Soviet premier's bombast over his Berlin proposal and the two Germanys' reluctance to engage in a compromise that would potentially weaken each ensured that Khrushchev's proposal would go nowhere.
With the benefit of hindsight, it is very clear that the Soviets were caught in a bind over Berlin. Attempts to force out the West from the city like the Berlin Blockade of 1948 or Khrushchev's Berlin ultimatum became PR nightmares for the Soviet power and prestige. But pursuing a more moderate conciliatory line over Berlin exposed Soviet foreign policy to sabotage by the self-interested SED and criticism for being soft by the Soviet's new competitor within the Communist bloc, Mao's PRC. The West's contradictory position on Berlin seemed to the Soviets to make it a useful diplomatic chip in the Cold War, but it soon emerged as an albatross for Soviet foreign policy exposing the weaknesses of the Soviet state and the limits of bluster.
The divided city was in something of a nebulous zone in the 1950s as its future status was unclear and both superpowers enforced a type of stasis over the city's future. This became a problem for the GDR as West Berlin became epicenter for a brain drain for the GDR. The manifest failures of Ulbricht's "Building Socialism" planned economy coupled with the FRG's clear economic success led to an outflow of skilled workers to the FRG via Berlin. Once it became clear that the West would not abandon Berlin and the SED could not have it as a unified capital, Ulbricht decided that a formal barrier was necessary to prevent further exodus of skilled labor. The Berlin Wall was the last thing that the Soviets wanted but it was the least-worst alternative compared to letting the crown jewel of their satellite system fall further behind the West. Ulbricht for his part portrayed the Berlin anomaly as an existential threat to the future viability of the GDR state and the Wall as the only real alternative.
First of all, I suggest a book entitled Berlin 1961: Kennedy, Khrushchev, and the Most Dangerous Place on Earth by Frederick Kempe. It deals with this period and is fascinating. He is not a professional historian, but he was a journalist and comes at the topic with a good writing style and interesting thoughts.
As with almost any answer to a question regarding Berlin between 1945 and 1989, the answer is Cold War politics. The nature of the occupation of Germany, and Berlin in particular, was a convoluted one. According to the "Protocol on Zones of Occupation and administration of the 'Greater Berlin' Area," Berlin as a whole was under the occupation powers. This is a portion of that document:
The Berlin area will be jointly occupied by armed forces of the U.S.A., U.K., and U.S.S.R., assigned by the respective Commanders-in-Chief. For this purpose the territory of "Greater Berlin" will be divided into the following three parts.
"Jointly occupied" is a key term here. This document positioned Berlin as a separate occupation zone from Germany. In it, the various occupying powers, France was later added, had rights in the whole of Berlin and had an interest in seeing Berlin as an occupied area.
This is what led to such difficulties. As the German Federal Republic and the German Democratic Republic were declared, Berlin's status was still up in the air. The Soviets had attempted to gain control over it in 1948 with the Berlin blockade, but the Western Allies had held firm that they had rights to occupied Berlin.
Between 1945 and 1961, as you note, there was a devastating outflow of citizens from East Germany to the West through the Berlin loophole. The Soviets, however, had created for themselves a difficulty. They, and East Germany, saw East Berlin as naturally a part of East Germany and treated it as such. Therefore, any acceptance of Berlin as separate from East Germany, especially East Berlin, would be backing down. On the other side, the US and the West were unwilling to accept ANY change in Berlin's status, both East and West, as an occupied Zone.
The Soviets were in an untenable position. To force the issue and take all of Berlin could lead to war with the West, but to treat East Berlin as separate from East Germany would be backing down and a betrayal of the East German government. Furthermore, East Germany's leader, Walter Ulbricht, was demanding that something be done or East Germany would collapse due to the emigration problem.
In 1958, Khrushchev made a demand that Western powers end their occupation of Berlin. He threatened to turn over all powers to East Germany. This would allow that government to end occupation in East Berlin AND force the Western occupiers to make a new occupation agreement with East Germany. The Soviets knew that an occupation agreement was something East Germany wouldn't allow and would lead to the occupation forces leaving at the risk of war.
The US believed that this was an illegal action. They argued that the Soviets could not end their occupation because the treaty had been made by a greater entity. Hence, occupation could not be ended by anything but the four powers together. This document is where this belief was stated.
This changed with the election of John F. Kennedy. According to Kempe, Kennedy misunderstood some of the situation and chose to give concessions to Khrushchev at the very beginning of the Vienna Summit. Kennedy continually used the term "West Berlin" when speaking of US interests and determination. This signaled to Khrushchev that changes in East Berlin and East Germany would be allowed by the US as long as West Germany and West Berlin's status were not altered. At an end was the U.S. insistence that East Berlin was protected, and a new foreign policy was at hand.
It was only after this summit that Khrushchev gave the go ahead for building the Berlin Wall. If the Soviet's had attempted to change East Berlin's status prior to this, they would have risked US action, but with Kennedy's "hints" that such an action would be allowed, Khrushchev allowed Ulbricht to move forward.
Sources
Carmichael, Neal. "A Brief History of the Berlin Crisis of 1961" National Archives. National Declassification Center.
Kempe, Frederick. Berlin 1961: Kennedy, Khrushchev, and the Most Dangerous Place on Earth. New York: Putnam Press, 2011.