It’s the right thing because airbnb distorts house prices (among other factors too). In some cases pricing locals out of the market in place of tourists. Which is why those rules are often in place.
Incidentally, you can give up on God without giving up on justice. This is in fact the basis of the law in countries without state-sanctioned religions: coming up with shared axioms of just behavior and reasoning from there. So yes, there are means by which one can define just and unjust prices. If someone is hanging from a precipice by a thread he may agree that the price of his life is all his wealth and the value of his future labor. This does not mean that this is a just price for saving him. Maybe it is, but that depends on your axioms of justice.
Edit: Apparently sometimes whole apartments/houses become airbnbs, which I wasn't aware of. My experience has been spare rooms being rented out.