This is from the U.S. Bureau of Labor Statistics:
“Most judges have first been lawyers. Federal and State judges are generally required to be lawyers. About 40 States allow non-lawyers to hold limited jurisdiction judgeships [Justice of the Peace, Magistrate], but opportunities are better with law experience. Federal administrative law judges must be lawyers and pass a competitive examination administered by the U.S. Office of Personnel Management. Some State administrative law judges and other hearing officials are not required to be lawyers, but law degrees are preferred for most positions.”
(Here’s a description of the duties of administrative law judges [from here]: “Administrative law judges, sometimes called hearing officers or adjudicators, are employed by government agencies to make determinations for administrative agencies. These judges make decisions, for example, on a person’s eligibility for various Social Security or worker’s compensation benefits, on protection of the environment, on the enforcement of health and safety regulations, on employment discrimination, and on compliance with economic regulatory requirements.”)