In a government role, I was required to obtain permission for any outside activity, with meaningful penalties. Significant engagements like that for an interview would be in scope.
The interview process being long or whatever or requiring on-site visits is reasonable, but pre-work is probably eliminating good candidates, or attracting people who don't pay attention to their contracts.
Actually, I did one of these jumping from one megacorp to another. It took up my entire weekend, but I landed the interview. I then had to take 2 days off to fly out for the interview. Luckily, I got the job.
You either got very lucky or you're far more effective at pre-screening companies than I am. The last time I spent that kind of time on a test was for a megacorp in the top 50 of the fortune 500.
The process was much the same as you described: multiple day test followed by taking two days off to fly out for the interview. Except I didn't get the job and nobody who interviewed me ever looked at the take home test.