Exactly. It's ridiculous to do that.
What's arguably even worse is when you know that the company knows what your salary expectations are ahead of time, and they still go through the entire process, and then at the end either come up with an offer that's way below your bar, or decline to make an offer because "paying you that much would create a disequity on the team". Yeah, I got that last one once... AFTER going through two rounds of interviews. I'm thinking "if you knew you weren't willing to pay me what I was looking for, why did you waste hours of my time interviewing?!??"