Anyway, this guy you placed as a "lower mid", this is your judgement, how do you know it's correct? Did other people say the same? Perhaps he didn't have the skills you were looking for but was good at other things. Saying the other company didn't do their diligence is easy but is that really what happened?
If you are hiring developers and placing them as lower, mid, lead etc. you are going to get flak anyway as you're just jailing them and hiring a load of people who only agree with what you think.
You're going to get people who are good at developing software who don't care about math(s) or machine learning, give them 2 seconds and Google and they can answer your Modulo question.
Is it not about the willingness and enthusiasm to learn? Or do they have to go through "hard" tests to prove they can work out some academic nonsense they are never going to need to use. To prove themselves to the frat. I'd argue a lot of really clever people good at the hardcore Computer science and data analysis type subjects aren't always as good at writing decent code.