It's all about getting their hands on foreign currency. Similar systems were ubiquitous across Eastern Europe, with the DDR's Intershop probably the best known: you could even take the subway across to Friedrichstraße in East Berlin and shop at the platform without needing to go through passport control.
https://en.wikipedia.org/wiki/Intershop