It’s not about testing ability to solve those problems, it’s about testing conformity, determination, and IQ (while being job-specific and thus legal).
Every place that tested leetcode in my interview (easy/mediums) never impressed me with their work culture. Usually it's a proxy test for obedience and/or accepting bureaucracy.
Also forget about career advancement. (Why would we promote you when we can replace you with another code puzzle solver?)
These are just completely bog-standard cognitive aptitude tests; in fact, they are if anything less rigorous than a modern IQ test. They're generally not specialized to specific jobs. You can read Reddit threads about people taking (and studying for) them.
Don't get me wrong: I think this is an incredibly dumb practice. But there's a mythology that IQ testing is a super-effective tool for recruiting that has been suppressed by anti-discrimination law. That is not the case. Most companies don't use IQ tests, because they're not fit for purpose.