Why would political loyalty be bad? These are cabinet positions, not representatives of the voters whose actions change with changing voter sentiment.
The cabinet is chosen to implement the President’s policies. It would be odd to select for people opposed to the policies or those would actively try and stop them through leaks.
Political loyalty is not bad (to a degree) but it is never good when it replaces actual competence as the main qualification, or when the required degree of loyalty is unreasonable.
It's just the political loyalty that's a bad requirement.