https://www.darkcoding.net/software/facebooks-code-quality-p...
https://blog.timac.org/2017/0410-analysis-of-the-facebook-ap...
Granted, perhaps things have gotten better in the last five years.
It's certainly possible for an enormous engineering company to have poor code quality or poor engineering practices, despite having a high interviewing standard. And a criticism of Facebook need not be a criticism of all companies that interview by Leetcode, for instance no one here is criticizing Google, Amazon, or Apple, and all have better reputations for code quality.
[0] https://www.reddit.com/r/iOSProgramming/comments/6upeu6/how_...
[1] https://www.facebook.com/notes/facebook-engineering/under-th...
You’re describing the attitude Facebook takes towards candidates, not the attitude I take towards anything.
Candidates should be saying to Facebook, “ I really hope all of your code is perfect every single time to be acting so high and mighty” and absolutely making a huge deal out of a case like this when it isn’t.