I can only speculate that if there was genuinely no ill intent, the intent was to somehow diffuse inner tension that the teacher was feeling. Sort of like joking about a bomb while waiting to board a plane (DO NOT do this), their brain went there, and they couldn’t deal with it rationally, so the wrong words (there…