In a very broad sense perhaps. A “legal background” as I use it as well as what I commonly hear refers to those who have knowledge/experience with the legal system, such as lawyers, paralegals, police, legal secretaries, some governement employees, and those in many related areas.
My 3 years of law school and related work resulted in a JD (Juris Doctorate) and me being admitted to the PA bar.
With respect to those who write and vote on passing or vetoing the laws, there is no requirement of a legal education. A lot of those involved directly and indirectly are attorneys however.
Those who challenge the validity and Constitutionality of the laws are almost all attorney’s however.