I think the intention of the law against foreign teachers doing private lessons is to keep people from being in the country illegally.No, the restrictions against private tutoring have everything to do with trying to maintain an egalitarian playing field in a country that has that as a goal but which is forever realizing it is nowhere near that.
Private tutoring has long been seen as a way for the rich to maintain an edge over everyone else in the hyper-competitive race to get into top-tier Korean universities. By making it illegal, they have tried to level the playing field. The illegality of private tutoring has been tried in varying degrees — with most Korean nationals also being prevented from doing it at different times. Only recently have some of the restrictions been loosened, with college students, for example, being able to teach privately (if they report it) but not teachers and certain other individuals in a position of authority.
Though the laws also apply to different foreign nationals in different ways (depending on visa), the laws themselves were created for an entirely different purpose.
At some point, when I have a body of resources to support it, I plan to write a piece on the origins of egalitarian narrative in South Korea and the efforts to strive toward that goal, since it informs a lot of policy in the ROK. Of course anyone can look and see that there are myriad ways in which Korea falls short (Korea's gap between rich and poor, particularly in housing costs and quality), but there are also some ways (universal health care) where it is much closer to the mark.
Much of the egalitarianism, I feel, stems from providing a counter to the communist or socialist rhetoric that appealed to much of the masses during the days of Japanese military rule and in the post-liberation era when a throw-the-opportunist-collaborators-out mindset was dominant, and then in the ten years or so after the Korean War, when North Korea was seen as more affluent than the South. With direct democratic elections starting in the late 1980s, bolstered by direct local elections in the 1990s, egalitarian ideals gained new traction for much of the electorate, with politicians recognizing that addressing the needs of a wider constituency was a more effective (and legal) way to stay in office.