Upfront rent is totally fine, Airbnb itself charges upfront. But 3 upfront rents? Ive never gotten a deposit or the extra rent back at the end. Airbnb isnt a real solution but i dont think landlords ever were either
As a counterexample, I've lived in ten different rentals over the past 18 years, and I have always gotten my deposit (minus reasonable cleaning fees, and in rare instances the cost of damage that was legitimately my fault) and any extra rent back at the end. Sure, there are shitty landlords out there who screw over their tenants, but it's not universal.
I have always been under the impression that they can only take money out of your deposit for _unreasonable_ fees. There is an expectation that wear and tear occurs from living in one spot.
The owner may take certain costs out of your deposit, and what they can and can't bill you for depends on the jurisdiction, but it is certainly illegal to keep your deposit without giving you an invoice for the costs. If this is what happened in your case, you could take your landlord to small-claims court to get it back. As general advice, anyone who is leaving a rental property would be well advised to take pictures of the whole place on the day they vacate, in case they have to debunk damage claims by the landlord.
Interesting ive been in this situation multiple times with 2 rents as deposit and i always got it back. I mean there is usually written agreement and if you take pictures of the initial state of the place it is fine.