The problem is that the happy-tenants outcome is a fabricated option. What would actually happen is that the landlords who can’t rent to tenants willing to have sex would just rent the room to someone who can pay a market rate in money instead.
Actual real-life people don’t behave like homo economicus with respect to sex. There’s no reason to expect that if the landlord can’t rent the apartment for sex, he would rent it for a monetary amount that is equivalent to what he would be willing to pay for sex.
(He also probably wants sex with a particular person, not with a random person, which already means that he wouldn’t raise the price of the apartment to enough to pay for a prostitute.)
Actual real-life people don’t behave like homo economicus with respect to sex. There’s no reason to expect that if the landlord can’t rent the apartment for sex, he would rent it for a monetary amount that is equivalent to what he would be willing to pay for sex.
(He also probably wants sex with a particular person, not with a random person, which already means that he wouldn’t raise the price of the apartment to enough to pay for a prostitute.)