States cannot discriminate against aliens, except in very narrow circumstances like being a police officer. If states could pass laws against aliens haphazardly (Rent apartment/not rent, Drive/No Driving, Get Fishing license/ not get fishing license etc.) you would basically have states making their own foreign policy, which screws up the whole separation of powers. See e.g. Takahashi v. Fish & Game Comm'n, 334 U.S. 410, 419 (1948) ("The Federal Government has broad constitutional powers in determining what aliens shall be admitted to the United States, the period they may remain, regulation of their conduct before naturalization, and the terms and conditions of their naturalization. See Hines v. Davidowitz, 312 U. S. 52, 312 U. S. 66. Under the Constitution, the states are granted no such powers; they can neither add to nor take from the conditions lawfully imposed by Congress upon admission, naturalization and residence of aliens in the United States or the several states. State laws which impose discriminatory burdens upon the entrance or residence of aliens lawfully within the United States conflict with this constitutionally derived federal power to regulate immigration, and have accordingly been held invalid.")