The Soviet Union supported the building of the Berlin Wall because it wanted to restrict the movement of citizens of East Berlin or of the eastern German Democratic Republic into West Berlin, which was made up of sections controlled by the United States, Great Britain, and France. The Wall did serve this purpose, becoming increasingly difficult to cross illegally as it was reinforced and strengthened over the years.
The negotiations and attempts to build some sort of peaceful coexistence in the aftermath of the building of the Berlin Wall did lead to wider international recognition of the German Democratic Republic as being a legitimate and separate nation; it was admitted into the United Nations in 1973. West German chancellors strove to develop agreements that would permit some contact across the Wall, particularly to support separated families, to no avail.
The rest of the world saw the efforts people continued to make to get out of the Soviet-controlled areas into West Berlin as confirmation of the failure of the communist regime. By the time Mikhail Gorbachev became president of the Soviet Union in 1985, the support for a separate East Germany and the military force needed to enforce the separation had disappeared.