Imagine that you're run-of-the-mill java programmer, but you'd like to dive into Machine Learning, or BlockChain, or whatever. Some companies will require you to have 3 years of previous experience before considering you for such job. Others will give you a Leetcode interview to ensure that you're smart, and then let you learn the actual tech stack on the job.
Also, Leetcode problems might be removed from everyday development work, but most of us did learn those things at some point, i.e. in college, so asking them in the interview kind of makes sense, it's kind of "common denominator" for all programmers.
I can stretch your logic even further that giving BE task to FE person is a discrimination because they don't have luxury to work on BE. Why do we discriminate against QA people who don't have luxury to work on dev jobs? Why do we discriminate against people who don't work as developers at all?
Interviews that test for anything that isn't directly related to the job the candidate will be doing are essentially codified discrimination - the expectation that someone will have a skill or significant knowledge outside of the job itself is effectively a way to filter out candidates based on arbitrary criteria even if they are capable of doing the work.
In other words, Leetcode interviews favoring people with lots of spare time is by design, because that's who companies that use Leetcode want to hire. There is little reason to believe that will change.