Or worse like where I live (Switzerland), people rent flats, then subrent them for a lot more and go live in Thailand (or somewhere else). And then we all complain because the prices for (renting or buying) flats is insane here.
The final price is determined by supply versus demand, not by the number of subrenters in chain.
The real problem in your situation is that these people are able to rent flats for sub-market prices. But it's not your problem. Your problem is that you don't have enough realty supply.
And/or more people who want to live in interesting city than interesting cities of Switzerland can house.
The latter seems to become a major problem in most countries.
Don't know about EU laws, but in Russia every apartment rent agreement I've seen (which is statistically insignificant amount, maybe 4-5 agreements) had explicitly prohibited reselling/subrenting.
Same in Bolivia. You're even explicitly disallowed to rent rooms out to people unless you notify the owner. I agree with it to, if I were to own an apartment and rent it out, I wouldn't want any random person to live in my home.