Hegseth is Trump's vector for taking full control of the military. This is why the scandals six months ago didn't sink him when by all rights they should have. Hegseth is too valuable to fire because he is Trump's hatchet man at DoD, sent to fire everyone who will not bend the knee, including generals and admirals.
Hegseth is going to be used by Trump (and Vance, and I suppose Thiel by extension) to purge the controlling elements of the military of anyone who is not loyal to Trump. The rank-and-file will always fall in line, and the junior officers are already Trump supporters as it is.
This is a prelude to the eventual suspension of the Constitution and Trump declaring himself President For Life.