At least as long as 'no X' is a reasonably moral thing to restrict. So no pets, no working on cars in the parking lot, no smoking, no loud noises/no more than N police noise complaints, etc. At least my moral code allows one to form a contract that restricts such thing and that when one party refuses to honor a (reasonable) contract, the other party should be able to require the breach be mended or the contract be ended, and that some breaches can't be mended.
Some things that might not be stated in a lease but would also be reasonable to evict for could include no interfering in the quiet enjoyment rights of neighbors, no storing of dangerous goods, no causing dangerous/unsafe situations.
Does programming cause property damage or impact other tenants?
I don't think it's a reasonable restriction, but unreasonableness doesn't make it immoral. At the same time, if you make an agreement not to program in a rental and then you program, shouldn't you need to stop or leave? I might have moral concerns about how one enforces a restriction against programming, it's probably intrusive
Now, if your question is no programmers and/or no overnight guests who are programmers and/or you can have six tenants in the unit, but no more than three who are unmaried programmers... Then my moral compass is pointing towards no. Restricting the practicing of a profession on premesis seems fine, descriminating against the practitioners is ick.
A single asshole can destroy an entire building.
Here's a nearly-strawman-but-definitionally-valid example: a landlord may want to remove a tenant who's being unusually hard on the place and accelerating the wear-and-tear. Could be serious enough that paying the tenant to go away would be cheaper than the cost to remediate the damage accrued over the length of the contract.
[1] https://www.hud.gov/sites/documents/hsg-06-01gapp5guid.pdf
If the tenant does something criminal, sure, that's up to the police.
Requiring a process in order to evict tennants is a good thing. If the process is unsatisfyable or extremely lengthy, I don't think it's a good thing anymore. There should be a way to get destructive and severely disruptive tenants out in a hurry. Ordinary breach of contract things (failure to pay rent, problematic behaviors that violate the lease but aren't an immediate issue, etc) should have something like a 3-7 notice period and then be referred to court and figured out without undue delay.
I'm ok with limiting the reason for the landlord ending a lease, especially where the tenant has stayed there for a long time.
IMHO rent control/rent stabilization can be useful when the cap isn't set too low, and there's reasonable ways to pass through less predictable costs. If the cap is too low, rent gets significantly behind the market rent which causes trouble for landlords but also leads to situations where renters end up stuck where they are; maybe better than being forced out but not if the property deteriorates. If the cap is too high, it doesn't provide meaningful stability or a planning horizon for tenants. If it's in the right place, it gives renters reasonable time to adjust to market changes. Again, IMHO, 3% is probably too low, 10% may be too high, somewhere in the middle is nice to have.
Tenant protections setting deposit limits and process for assessing against the deposit seem reasonable to me. Landlords are going to screw tenants out of deposits if they can, regardless of the market realities, because the relationship is over, the renter is busy with other stuff, and the landlord has the money.