Only if there's one programmer for the job. If there are many equally skilled programmers applying and interviewing for the position, then the company absolutely has the power.
And to be clear, I never said that the interviewee should be willing to take abuse or insults. However, it is perfectly valid for an interviewer to see how the interviewee handles constructive criticism of their work. That can tell a lot about an applicant, especially on how they might fit in your company's culture.