Vast generalization here (I'm not a legal scholar)- but it looks like laws have been put in place to 1) encourage something viewed as good by the legislature or 2) discourage something viewed as bad by the legislature. What is viewed as "good" or "bad" is up to the legislator, the folks that the elected the legislator, the folks that the legislator represents, and most important to our current system of campaign finance, the folks that pay for the legislator's campaign. Airbnb is ostensibly a mechanism to allow people to profit from use underutilized space. Unfortunately some of the underutilized space is contained in clauses in lease agreements that the Airbnb hosts chose to ignore.
The hotel laws were put in place because of abuses. Rent control was put in place because of abuses and to encourage affordable housing. The "bad actors" are those that are abusing the system at the potential risk to their customers- and they are customers, not guests. Because of the immense amount of money moving around, there will be abuses and bargains. Leave it up to a company to determine the bad actors, and they will invariably call out those that pose the greatest risk- and since it is a profit driven company, risk is about money, with no consideration given to public welfare (ostensibly the government's arena).