It really is so problematic that cities like Berlin, Amsterdam (and I believe Venice) and many more crack down on AirBnBs. Hard. You are allowed to rent out the apartment where you live, but for limited time and with high fines or even extradiction on renting out beyond the limits (e.g. 90 days per year). You are certainly no longer allowed to have AirBnBs for the sole purpose of renting out to AirBnb.
Edit: and in e.g. Berlin, AirBnB does not hand over the data of their users/renters (which Is good, I presume). So they have people scanning the renting-websites, visting homes and even posting outside to find evidence something is rented out beyond the allowed duration.