Why would the US government be eager to stop illegal intruders into its own country from leaving the USA to wherever, including Canada?

Why would the US government be eager to stop legal immigrants into the USA from moving on to other countries such as Canada?

The USA is not like the Communist countries behind the now happily collapsed Iron curtain , with watch towers, mine fields and border guards designed to keep its population within its borders, shooting those who try.

It would like to build a border that illegal intruders could not penetrate, with entry systems for those who wish to enter the country legally to become productive loyal citizens.