I am not sure that is true at all. People with family or basically any commitments outside of work don't have anywhere near as much time to practice for this sort of thing and why should they need to practice for an interview? You do the job every day, if that isn't enough then the interview is clearly testing for the wrong thing.
I've done this rodeo in my thirties and forties, complete with a very busy existing job, family, long commute, etc. The bottom line is that the time investment wasn't terribly large as it was more refreshing than learning things from scratch.
Putting the 20 hours in over a couple weeks for a 2x raise felt like a worthwhile expenditure of my free time, and worth prioritizing over some of my every day commitments.
However as someone without a CS degree who is nonetheless able to get jobs as a software engineer because there isn't a process of credentialing, I am glad much of the industry works the way it does.
As much as we all hate the tech interview process, it's a relatively level playing field as far as hiring goes. It's not perfect, of course, but we have to select on something.
As engineers we have a level of free access to study tools and material that my friends in other professions envy.
The alternative to skills testing is to rely more on credentials, references, and background. People who come from elite universities or lucked into prestigious jobs early in their career tend to prefer this type of interview process because it benefits them the most while excluding those who are trying to break into the industry.
The benefit of skills-based testing, however imperfect, is that it opens the door for people who have skills but not the right background or credentials to skip through the ranks and get a foot in the door.