I was a dev for a few years, went to law school, worked in law for a bit, and have now switched back to being a software engineer (thank God).
And I am not the only person I know with backgrounds in both--there are dozens of us!
Feel free to reach out to me if you'd like to chat. samier_saeed@protonmail.com