There was no general justification, and formally travel was not prohibited.
Emigration. On this I have heard one justification: In Soviet Union many things were free for all (education on all levels, medicine and other social benefits).
In theory every person was expected to "contribute to the society" in return.
So the argument was : if you emigrate then you do not return what society spent on you. At some point, when under the pressure from abroad, limited emigration was
possible, they charged an enormous sum of money to give a permission to emigrate.
Simple travel, for vacation for example. Soviet citizens were not expected to possess any foreign currency. Any currency speculation was a serious crime.
(The punishment depended on the amount, but it could be death sentence).
So a person could not just say: "I want to go abroad for vacation". S/he had to ask for some money exchange. So one had to apply for "permission to travel", and some (very small) number of permissions were indeed granted. Who could travel and for what purpose was strictly regulated and the rules were different at different times.
No one would dare to claim that s/he possesses foreign currency. And very few people would dare to say that they have relatives abroad or that some foreign agency invited them. And if you say so, the matter will be investigated, and you may eventually obtain a permission or not. One common reason to decline an application was "there is no guarantee that the person will return". (See section 1 of my answer). For example they normally would not permit an unmarried person to travel to a scientific conference on this ground.
So in theory there was no complete prohibition, and thus no justification was given or needed. In general, the Soviets never accepted the principle that "everything is permitted which is not explicitly prohibited". The general principle of the
Soviet society was the opposite: "You need to obtain a permission for every move". This was a totalitarian society.
- On the border patrol. Yes, indeed a huge army
was employed (the so-called interior troops, earlier these were KGB troops). The official purpose of this army was to protect the border from the spies, terrorists and saboteurs penetrating from outside:-) They NEVER mentioned the real purpose
of the border patrol in official publications.
EDIT 2. There was a whole genre of adventure fiction for children, about glorious border troops (пограничники) who were catching the spies. It was a kind of revelation to realize at a later age what the main function of these troops was.
EDIT. One general remark on the questions "about Soviet Union". Soviet Union existed bout 70 years and the situation changed. My answer addresses the situation from 1960 to the middle 80s, of which I have personal experience. Relaxation of restrictions began in 1989.