You're not wrong, but this falls under the genus of "companies that suck at interviewing," and thereby hurt themselves (i.e. the company). In other words, it's not an inherent fault of the programming interview.
But there is more to it than meets the eye.
Some companies actually just are that incompetent.
But, to take a particularly successful and egregious offender: is Google actually just that incompetent? So that they systematically do hiring in a poor way?
No, of course not.
They actually don't want the best people.
They want the mediocre people who are also obedient. The kind of people who can be told to study an algorithms book, and will do it, and will regurgitate it, as a show of obedience, mostly, but also mediocre (but not great) intelligence---not great, because if they had great intelligence, they wouldn't waste their time on that kind of activity.
Such people can be treated as interchangeable cogs, which is why BigCo wants to filter for them.
Perhaps a bit cynical but there is truth to that. A huge company just needs cogs that can do the job and don't think outside the box much.
Getting good at interviewing should also be a priority, and is doable.
Getting good at interviewing is largely about developing (a) genuine programming skill; and b) at least some people/communication skill.
When you have those skills, you have less anxiety about the interview, and can perform well.