Which is why the US legal system has the judiciary as a separate and co-equal branch of government, and the fourth amendment requires the approval of a neutral and detached magistrate.
The DOJ's emotional state has nothing to do with their ability to order Levison to hand over the keys because the order didn't come from them, it came from the Court.
When it comes to the DoJ and FBI, these institutions are immensely powerful compared to individuals, they should have MORE restrictions on an individual agent/employee taking retaliatory actions based on their emotional state.