Your question has a mistake in its basic assumption about how lawyers were trained in previous centuries. Whereas nowadays, almost all attorneys attend law school for three years and get law degrees before taking the bar exam, this was not so in the 19th century.
Traditionally, attorneys were trained under the apprenticeship model, where an aspiring lawyer would train under an established practitioner before taking the bar exam and becoming fully licensed. (This is called "reading law.") Even so, this requirement was treated in a rather relaxed manner on the frontier. Abraham Lincoln was admitted to the bar in 1836 and was self-taught, by his own admission.
It wasn't until the late 19th century that it became the norm for lawyers to attend law school, after a series of reforms promoted by the American Bar Association that made reading law progressively harder. Side note: there was an element of racism supporing these reforms, as the ABA was determined to keep new immigrants out of the law as much as possible, and new immigrants generally didn't have the finances to attend law school full time for three years.
That said, even in the modern era, it's still legal to read law in some states; famously, California still permits people to take the bar who never went to law school at all, provided they meet certain requirements.