I suspect it was something to do with keeping westerners and 'fascists' out, but was there any discussion about not letting its own people out, presumably never to return, effectively creating a prison society?
The primary concern when erecting the Wall for both the Soviets and the SED was not the opinion of their own populace, but the reaction of NATO military forces in West Berlin and whether or not they would intervene against the erection of the Wall. The fear was that such an intervention would place both of an awkward whether or not to escalate the situation.
Thankfully, NATO forces allowed the construction of the Wall to continue, but the public symbolism of the Wall was not lost on the SED. The GDR press tried to spin the Wall as a necessary part of GDR defense and the official name of the Wall was Antifaschistischer Schutzwall (Anti-Fascist Protection Rampart). But to sell the idea that the Wall was a defensive fortification, let alone an anti-fascist one, was an uphill battle. The erection of the Wall led to a plethora of jokes in the GDR about the Wall and the pretenses of the SED that undercut the claims that it was a defensive act. Here are some choice examples that illustrate this:
Why are the East Berliners dumber than the East Frisians? They built a wall but placed themselves on the wrong side.
Why was it foolish to build the Wall in order to protect socialism? If it weren't for the Wall no one would want to escape to the West.
Why is there no smog alarm in East-Berlin when there is in West- Berlin? Our borders are tight.
As these jokes illustrate, the many GDR citizens saw through the facade of "anti-fascist protection", but begrudgingly accepted the reality that the Wall was seemingly there to stay and designed to keep them away from the West.