I've started interviewing candidates for Software Development positions many years ago, even before I started managing teams. For a long time, though, I absolutely sucked as an interviewer, and this is something I only know in hindsight. In those first years, I've received neither training nor feedback with regards to interviewing.
If you've ever interviewed as a candidate, you've more than likely had at least one bad experience, and most others were mediocre. That's because most interviewers do not receive any training, they're simply thrust into the job of doing interviews, and the only thing they know how to do is the same crap they've experienced when they were interviewing as candidates themselves. There's also a pervasive mindset that many interviewers share: They view the interview process as one-sided, i.e. the candidate needs to convince them why they should hire them, but there's no burden of proof on the company/interviewer. There's a big power imbalance.
I've had a few terrible interviews of my own in my younger days. I once interviewed for a telecom company that had the messiest offices I have ever seen in my life. It was chaos. The manager interviewed me in his filthy office full of dirty network equipment that was thrown everywhere. After the "main part" of the interview he asked me to step aside while he deliberated with a colleague about whether to hire me. He opened a door that led to a stairwell heavily stinking of cigarettes, where the lights were broken. I was left standing for several minutes in pitch black while they decided whether I was worthy of getting their shitty job. When they let me back in, the manager said they wanted to offer me the job, but felt it important to mention that it was a real job, where you don't go home just because your contract hours were over, and you're expected to give your all to the job. I stood up and left, didn't say a word.