Juridically speaking the typical leasing/renting contract prohibits the tenant to sublet his or her apartment or house.
1. If the landlord who owns the apartment allows it, that clause is not in the contract.
2. If the clause is present it only prohibits you to sublet your appartement to another person. Subletting implies that you leave the premises and the third party has been approved by the landlord and the new tenant assumes the obligations if specified in the contract as such otherwise the original tenant continues being responsible for the financial and other responsibilities described in the lease.
3. Having guests in one’s apartment whether they are non paying guests or paying guests could only be prohibited if indicated clearly in the rental contract. Who in their sane mind would sign a lease (unless pressed by economic necessities) that prohibits one having guests in their own house?
4. A clause that specifically prohibits a tenant from running a business of any type or nature in the rented apartment could indeed obligate the tenant to cease its operation if welcoming guests using such a platform as AirBnb to provide a service of accommodation which is very different than renting or subletting space which is regulated in many if not all countries.
This is not what I was suggesting in my earlier comments. Renting or subletting is defined by a law in Spain where they also define the space rented or subleted for longer than six months as Touristic Appartements. If you want to operate this type of business in most large cities in Spain you will need a license. If you are Home Sharing only then none of those cities currently offer a license to do so, hence you can offer this service and are subjected to other laws that oblige you to pay taxes on revenue gained by those services you provide when you share your home with paying guests.