Let's recap. Trump asked, "How do we do a Muslim ban and make it legal?" This travel ban on seven countries is what they came up with.
It didn't start with, "We have significant worries about travelers from these seven countries". It started with "How extreme can we get with banning Muslims, and how can we manipulate the rationale so that it survives the courts?"
Trump did it to appeal to his bigoted supporters. There's no way around that. If you voted for him, this is your fault.
I imagine the conversation went something like this:
Trump: "I want a muslim ban" (let's assume worst case intent).
DOJ: "You can't do a muslim ban. It's unconstitutional".
Trump: "Well, what can I do to keep radical islamic terrorists from getting into America?. And you'd better tell me or I'll fire you all."
DOJ: "You can't fire us, sir"
Trump: "Oh"
DOJ: "Getting back to your EO, sir, it can be targeted on geography and/or known bad actors (individuals). It cannot be based on religion or some other personal characteristic, like race, gender or sexual orientation. And it's probably a good idea to limit the geography to places deemed to be of high risk by the intel community and the NSC, etc."
Trump: "Oh, that's fine. I just want to keep bad actors out. How about we go with the 7 countries from the Obama list?"
DOJ: "That would be legal."
Trump: "Perfect! Thanks for your help!"
DOJ: "You're welcome, Mr. President"
Trump: "Hey, are you sure I can't do more?" (Again, assuming some overly zealous intent)
DOJ: "Perhaps you could add a few other countries, but it might not be as black and white from a legal perspective."
Trump: "OK".
So here we are.
Screwed up: Not excluding green card and visa holders from the EO, which I believe has been straightened out as of Sunday (?)