Can you be specific about what they did wrong.
Sure, in brief:
First, it appears they delegated the lead in this to a political operative rather than a senior staffer who was an expert in immigration law, intelligence and defense and to compound the ineptitude they seemingly delegated the drafting of the EO to a low level staffer without giving any direction as to the ramifications of each word of the EO and clear direction as to what they were attempting to accomplish with the EO.
Secondly, the EO was overboard, making no provision for LPR's, those travelling on business visa's, and military personal among others.
Third, instead of recognizing they had screwed up, admitting it, and fixing it, they went for days pretending everything was hunky dory squandering both political capital and public trust.