Why would candidate Trump’s statements be considered in immigration lawsuits?

Constitution Center:

…In the McCreary case back in 2005, Souter wrote the opinion for a 5-4 divided court. Two counties in Kentucky posted visible copies of the Ten Commandments at their courthouses. After objections were raised, the Ten Commandment displays were included in a larger display that added historic documents such as the Declaration of Independence. The additional documents had their references to religion highlighted.
Souter found that the counties couldn’t argue that their earlier attempts to get the displays installed for religious reasons, including statements made by public figures to that effect, should be excluded from the case.
“They argue that purpose in a case like this one should be inferred, if at all, only from the latest news about the last in a series of governmental actions,” Souter said. “But the world is not made brand new every morning…

…”The Counties’ position just bucks common sense: reasonable observers have reasonable memories, and our precedents sensibly forbid an observer ‘to turn a blind eye to the context in which [the] policy arose,’” said Souter,