Occasionally students get hung up on difficult questions, determined to solve them, losing time for the remaining questions. Yes, this is an anti-pattern, but it is a fact of life. By incorporating an impossible question, you waste the time of honest[1] students.
Some will recognise that the question is impossible and move on. Some with good exam technique will know not to get stuck on a problem they can't solve until they've had a go at all of the other questions.
But some honest and hard-working students will have got a worse grade than they deserved because of this stunt.
[1] Consider, as well, 'desperate' students - students who need a certain grade for some reason or another. Maybe this class isn't these students' priority, but they need to pass to be able to study the classes they love. An impossible question could drive these students to cheat, when they never would consider it otherwise[2][3].
[2] Consider the detail "about half the class left the room to use the bathroom during the test - far more than the usual".
[3] This bears resemblance to vigilante groups targeting peadophiles. I don't know what to make of that.