The law is pretty technical. Having people who don't understand law as legislators is like having a product manager or stakeholder for a tech product that doesn't understand tech. It's not impossible but requires some extra work and moves a lot of influence into the lawyer's/tech person's hands anyway. It happens where lobbyists sometimes literally write bills that gets passed into law.
The law is indeed technical. But you know what's even more technical? The topic they are trying to legislate. I would rather have lawyers as staffers and the actual lawmakers come from a diverse group of backgrounds. As it stands now, most lawmakers are coming from a very small set of backgrounds and there are not enough scientists or engineers among them.
Legislators have to think about so many issues that no one science specialty could prepare them. What does it matter if some legislator has a PhD from Podunk University and wrote their dissertation on the mating habits of red-billed geese? If intelligence is the criterion let's just say that. AOC was a waitress before she was a representative, if we're talking about diverse backgrounds.
In my experience scientists and engineers are practical people who are interested in solving problems and improving things. We need such people in positions of power and authority. In contrast people from non-STEM fields, and in particular lawyers, are more interested in activity than results.