It is your promise to be a good tenant. But, the security deposit does not belong to your landlord. It belongs to you, the tenant. Your landlord is just holding the money for you. This is up to your landlord.
Most landlords ask for enough money to cover one or two month s rent.
If you have a lease for longer than a month, the landlord has to wait until the end of the lease to raise it. Anything else both you and the landlord agree on in the lease. But, this is all your security deposit can be used for. It cannot be used for normal cleaning and painting. It also cannot be used to fix damage that was not done by you or your friends, family and pets, even if the damage happened when you were living in the place.