My guess would be that he politely mouthed off to the guards a bit. Technical people are at risk for harassment because we assume that the process is about something other than the guard not taking a personal dislike to you.
My guess was that he raised his voice or otherwise displayed ire. Undoubtedly he did something a wise person in his shoes would not have done. But he probably didn't deserve a beating (although we lack any evidence that that actually happened).