Pete Hegseth’s hostility toward the press has been a defining characteristic of his time as defense secretary.