The answer is simple - money. Digital nomads typically don't take jobs from local residents, they on average have more and are willing to spend more money than the typical local resident, and additionally the country has no responsibility to provide social benefits to a digital nomad and thus they are low cost.
Additionally while digital nomads may sometimes be ignorant of local culture/tradition and that can be somewhat annoying, they typically don't cause problems when it comes to crime.
Now there are legitimate concerns with respect to housing with things like AirBNB's/under the table housing arrangements and causing the housing prices to increase, but while that is an issue to a local resident it is actually seen as a positive to the city itself when it comes to the economy.