"No matter what happens on appeal, I believe the president is being taught an important lesson. In this country, you don't always get your way, even if you are the president. "

Well, the "way" in question is whether a U.S. president has the power to do his #1 job -- protecting the people of the U.S.

Another "way" in question is whether non-citizens of the U.S. have rights under the Constitution, and where those rights start and stop.

Yet another "way" in question is whether religious identity and being nice to brown skinned people trumps all matters of national security.   

There are many more issues which are important to consider.    Don't think it all just boils down to some notion of the president whimsically "wanting to have things his way."