Yes it’s stupid. Yes it’s not something you’ll ever actually do on the job. No it’s not a real indicator of your actual programming ability. But it’s what you have to do to beat this part of the game and move on.
And, yes it sucks, but it’s not THAT hard in the grand scheme of thing. Basically what’s happening is someone is saying “we’d like to hire you for a job that pays significantly above the national average, is safe, low stress and generally pretty easy when you think about it. All we ask in return is that you brush up on some things that you have already had to learn anyway.”
I would also argue that it’s at least partially about seeing how driven you are. Everyone knows that you’re probably going to get asked Algorithm and DS questions in an interview. There are literally several very popular books entirely dedicated to that fact. So you can either have a self-centered, egotistical, “I don’t think I should have to know this and I know better than everyone else so I am not going to learn it” attitude, or an open, eager “I really want this job and I know they will probably ask me some of these kinds of questions, so if I have to take a week to brush up on these concepts I am more than willing to do so attitude.” Which do you think makes for a more attractive potential employee?