It's also a great way to filter out anyone who has any kind of commitment like kids, aging parents to take care of, or have health issues themselves that makes it hard to cram leet code non stop on top of a busy career.
For companies this is very rational, you want non-distracted employees who can work over time.