It reminds me of a landlord who charged me $300 for returning my girlfriend's key late since she was out of town. I talked to him before and he said oh sure, no problem just bring it by the office... Then charged $50 a day. Of course, anyone decent would have warned me or not charged me. His defense for this was that "the contract allows me to do that".
In UK law some terms in a residential lease are considered Unfair and so you (a person) can't agree to them. The lease is read as though those terms weren't there. Landlords responded to this by adding a paragraph of legalese that says you (the signatory) know the terms are unfair but you agree to them anyway.
Judges went "I see exactly what you're doing here, No" and just struck the offending paragraphs and unfair terms.
Of course just because you'd easily win in court doesn't mean they'll stop bullshitting you outside court but some things a landlord might want to do (e.g. kicking you out) already require a figleaf of court approval, and the court ain't going to approve when the contract is clearly Unfair.
When I was younger and rented I ran into plenty of scumbag agencies who tried to screw me over. One of the most popular ideas back then was to charge a high fee for the "service" of photocopying your lease and writing new dates in. The Housing Act says if your residential lease reaches its end date but you're still paying and nobody sent you paperwork requiring you leave then that lease hasn't ended until they do. So no thanks, I don't want to pay £100 for photocopying. If you want this lease to run for another whole year you can do the photocopying and I'll consider signing but I'm not paying you for that.
The government eventually just forbade fees for residential tenants all together. If big agencies want £100 to make a photocopy they are welcome to try charging that fee to the person or company that owns the building instead of the tenant. As you'd expect despite dire warnings from the industry in the end it just stopped charging fees and took a small dent in profits.
Yes, in the state I was living in landlords often include clauses in the lease that are specifically banned by state law. for instance, we had a landlord to say that we had to give them 30 days to move out, but they could ask us to move out with only one day notice. It's not legal and not enforceable, regardless of what we signed.
However, the market is so tilted towards landlords that basically if you want to live somewhere, you sign it. However in court, these clauses would not be enforceable and might be enough to strike down the entire agreement, in which case the tenancy terms become default tenant law.
regardless of the contract, it's very difficult to say that this was reasonable and that he's not taking advantage of us.
I had actually already turned over my key, done a walk-through, and the house was completely empty. It's hard to argue that he needed to charge me $300 to returning a key late. If he had informed me of this, I would have been more than happy to replace the deadbolt for $20 and give him the new keys.
I actually did not see anything like this on the contract. It's also not clear if it's legal in my state. If it's in the contract and not legal, I believe the entire contract is void. In any event, this is a small fraction of the nearly $1,000 that he withheld from us. It was apparent that taking him to court was not going to be effective.