Apparently a federal judge is weighing the legality of U.S. troops defending U.S. borders. It may be that he or she believes it unreasonable to not require that troops defend borders only after foreign entities have passed through it in time of war. In other words enemies of the United States may legally get the first punch in on attacking the U.S.A. The U.S. Army is allowed by Democrats to defend the borders of other countries at least (and Ukraine to a certain extent). It is possible that in foreign wars the United States military will be required to stay back of national borders and just stay in the middle of nations. Alternatively, the (probably Obama appointed) Judge might be concerned about soldiers getting to near the edges of the nation where they might fall off into space.
The President sent U.S. military elements to the border to help get the border wall built and to defend the national and citizens against mass illegal entry to the U.S.A. by mass clusters of aliens from around the globe. Some are criminals and some may be foreign agents with hostile agenda.
It might be reasonable for the President to station troops along the border with a boundary wall as one of the walls of their residences. Some troops should be away from the borders where they can defend against foreign paratroops, Democrat party riots or insurrections, guerrilla wars or just to be able to enjoy entertainment venues when off-duty, yet permanent linear military bases along the borders would be a cost effective way to get more bang for the security buck.