Leetcode type challenges are just a proxy for logical habilities, which are highly desired for SWE positions. It's not meant to evaluate every ability. Despite imperfect, I don't know of a better indicator that has similar cost. An employer won't spend a lot more to evaluate with perfection how good we are with logic.