The justification is that the purpose of such laws is to protect people who need legal help from being victimized by con men, or by people who may be well-meaning but who do not know anything about the law and thus are not competent to help. I presume that few people facing serious charges that could result in a huge fine or imprisonment would want to be represented by someone who's legal knowledge consisted of having watched a few episodes of "Perry Mason".
The more cynical explanation is that lawyers got together and had these rules passed to cut down on competition. If you have to jump through a bunch of hoops to be allowed to be a lawyer, then there will be fewer lawyers, and thus less competition, and thus lawyers can get away with charging higher fees. Suppose you owned a business. Wouldn't you like to have laws in place that prevented competing businesses from opening and taking away your customers?
Believe what you like. I'm sure the reality is a mixture of both reasons.