Its equally weird that a large chunk of people employed to write software went to college and majored in things that require understanding and writing software.
I understand where you are coming from but it does seem straightforward that people who study the law would end up in careers where they write the law.
On the face of it, it doesn't seem any more odd than that judges are usually attorneys. Also, you'd expect people who are more involved with arguing the law to gravitate toward trying to get the job that involves creating or amending the law.