There's also the chance that they didn't care to build their training set to match the expected population. Another industry dealing with this is automotives. Until recently tests were done exclusively on male crash test dummies. This resulted in higher mortality rates in women as things like seatbelts and airbags were tested on models not reflecting their bodies.
This would all be because either they didn't care or they didn't realize they should care. Which is to say, I agree with you and the problem you touched on is far more pervasive and effects more people than just the legal system and we need to start doing a better job addressing it.