He was a college professor. Hagel was speaking at the University of Nebraska where he went to school. He had previously answered a question on Afghanistan and negotiating with the Taliban before the exchange.
A longer version of the event is available here.
Absolutely no slight toward any individual in the audience was intended. That's the last thing the Secretary would do under any circumstance, in this or any other setting. He didn't know who would be called next to pose a question.