He's part of the Department Of Defense
Not the Department Of Offense
Hagel probably didn't understand that the Military's primary role is to protect the Commander in Chief, with their secondary role being the CIC's transportation service for fundraisers, vacations, golf outings and similar activities.
Hagel was picked because of his ties to the Iranian American lobby groups, who helped fund his campaigns. He was fired because talks failed with Iran. Hagel was there because Israel didn’t like him.