Platforms like AirBnB only put oil in the fire when it comes to housing crises.
The move that Barcelona just made might actually be kind of like closing the barn door after the horses have escaped. Good political theater, I guess, but not really moving things in a direction they weren't already going.
https://www.lawinsider.com/dictionary/hotel
Note that style of construction does not seem to be a factor. Many hotels offer freestanding villas or cabins, practically small (sometimes even not so small) houses, and have for a long time. Chains like Residence Inn, Homewood Suites, or Extended Stay America have likewise offered hotel accommodation in the physical form of an apartment for almost as long. Personally, I think the inclusion of housekeeping services during a stay is a big differentiator, perhaps because it demonstrates intent to serve a transient clientele. By contrast, a "dual use" house or apartment that is owner occupied part of the time and rented out part of the time does not show such intent. Neither do the illegal sublets that are behind many Airbnb rentals.
In other words, the physical similarity between a suite hotel (like the one I'm in) and apartments doesn't seem determinative. Rather, what seems to matter is the financial difference between a nightly (or perhaps weekly) guest vs. a longer term lessee. I'm not saying whether it's right or wrong, but it does explain why different types of levels of regulation are applicable to each.
P.S. The ones "escaping regulation" are the Airbnbs, not the hotels. Hotels are subject to much more stringent standards wrt safety, sanitation, privacy, billing, etc.