The top level positions in such monstrous agencies are primarily political, requiring primarily political skill sets.
That’s just the way it is.
HUD is not a major Department...it only employs 9000 Fte’s.