"No one has the intention of erecting a wall!" - Walter Ulbricht, June 15,1961.
The Wall was erected anyway, because more than 2.6 million East Germans escaped to West Berlin or West Germany from 1949 to 1961. People with West German DM could get goods very cheaply in the Eastern part of Berlin. Many young smart people escaped to West Germany in search for better life. GDR was piling up problems and most simple solution was to build up the wall.
After building the wall, things changed.
According to this article 63,000 East Berliners lost their jobs in the West. Trade between people from West Berlin and East Berlin stopped. State deficits grew rapidly, world competitiveness became a far-off dream, and discontent continued to mount. Economic and budgetary distortions remained, making it difficult either to direct resources or to control a budget. Dissatisfaction in east part of the city grew.
Except prevention of further emigration, what benefits did GDR directly receive from building the wall?