Obviously the solution is "build a million extra houses". However, it turns out building a million houses takes time. Until the houses are built, get rid of the temporary housing meant almost exclusively for tourists this particular city doesn't want, everybody wins.
"Rich tourists" are good for purely tourist driven economies, but most cities don't exist to please the whims of tourists, and most local businesses in a wealthy economy aren't targeting rich tourists either.
What actually happens is that family neighbourhoods are forced to deal with constant parties and drunk and loud tourists because some multimillionaire set up one of the rare available houses for his personal profit.
I'm sure there are people who enjoy living in AirBnB's but that's not what AirBnB is even trying to accomplish. Hotels exist and are regulated for good reason. Tourists are put in touristy areas where businesses want to attract tourists, also for good reason.
When dealing with a housing shortage, the local population is more important than tourists, unless there is no economy other than the tourist economy. Look at what happened to Venice, the city that exclusively exists because of tourists because of overtourism.