Well, guess what? Licensing and testing still doesn’t prevent unqualified medical and legal practitioners from entering the field.
In the beginning school accreditation was supposed to ensure quality of education and uniformity of standards. Accreditation STILL does that and is STILL required, but no longer good enough. Why not? What has changed? If anything, education has gotten better, especially in the sciences, because knowledge has expanded.
Compare the pass rates from the minority schools with the pass rates from the regular schools. (It would be even more striking if you could factor out the affirmative action admissions).
For law schools:
In Texas, compare Texas Southern and St. Marys with the other schools in the state. In Louisiana, compare Southern to Loyola and LSU. North Carolina - compare NC Central with UNC or Duke or Wake Forest.
Then, maybe, you’ll understand why bar exams are necessary.