I think landlords have to give you notice before entering your unit in most areas.
Swapping locks is maybe a ten minute job (probably less if you've done it a lot).
There's nothing to stop a tenant from swapping out the locks, then swapping the landlord's locks back in before a scheduled visit.
...And you might also get to pay for the water/fire damage to other appartments because it took longer to get into the appartment due to something you did.
1) the landlord didn't change the locks between tenants AND there's a great "key copying conspiracy."
Or
2) There's an emergency requiring your landlord/maintenance to enter the premise when you aren't home.
I know which one I find more likely, but you do you.
OTOH Probably most landlords won't mind you changing the locks as long as you give them a copy of the key.
I have changed the locks everywhere I have rented.
In my country, a landlord have zero right to access a rented property. Even keeping a copy of the key is forbidden. Emergencies are for firemen and police and they basically don’t care about your lock if you don’t answer.
The only way they would ever find out is if they were trying to enter your place unannounced.
People need to feel safe in their own homes.
So I had to put the old cylinder back in, because of condo rules about the property management company needing keys.
(Though I later learned that the property management company might not have been able to find my unit's key if they ever wanted to. One day, the fire department was at the building, trying to get into a different unit, which had an alarm sounding, but they found that the key box was empty. I was there, so I called the management company, but they refused to send a runner with the key. Even after I handed my phone to the firefighter in charge, and he identified himself and asked them again. :)