I mean, stealing the answers (or even just the questions) would be cheating, of course stolen answers would make it a lot easier for a human to pass too. Nobody is surprised that if you
cheat then the exam is no longer a good proxy measure for professional competency! Nobody expects or intends it to be a good proxy measure for those who have stolen the questions.
I actually doubt you could write software to pass the bar exam with "a bunch of regexes that have an associated formattable string and/or answer result." I'm not even sure what that means, but I suspect you aren't familiar with bar exams. They are very hard for humans that are in fact familiar with the material; they can contain "trick" questions and require thinking about edge cases, etc. They generally include both essay questions and multiple-choice -- and it can be very tricky multiple choice.
Here's just one of the first samples I found googling, I have trouble imagining "regexes with associated answers" doing anything useful here: https://barexam.virginia.gov/pdf/essays/2022%20February%20VA...
Here are some multiple choice examples: https://www.ncbex.org/pdfviewer/?file=%2Fdmsdocument%2F17
i'd be shocked. But feel free to spend a couple years trying to prove me wrong!