Because tourists tend to impose negative externalities upon the city (like getting drunk and throwing up in the streets), and long-term residents tend to impose positive externalities (like planting flowerboxes at their windows).
Also because residents pay for public services via taxes, and tourists staying in illegal Airbnbs don't even pay hotel taxes.
Also because residents, not tourists, vote.