The material basis is that the bourgeoisie benefits from enforcing strong borders. If there were no borders, then workers could move freely, and that would give them more power.
Nobody really wants to shut down immigration entirely, but they want to maintain strict control of it in order to maintain discipline in the labor force.