Security deposits are a type of refundable fee where a tenant pays a specific amount (often many hundreds of dollars) to a landlord to "ensure" that they don't damage a residence while living there. If the residence is damaged, the landlord keeps the deposit. The term is derived from contract law where "security" just means a way to make sure that a party to a contract meets their contractual obligations.
There are many instances where a landlord illegally keeps the deposit over damage that was either already existing or minimal (also referred to as "wear and tear" damage, which is expected when you live somewhere long-term), so OP is calling for the courts to determine the extent of damage to prevent landlords from taking advantage of tenants.
In some jurisdictions (like the one I live in), security deposits and most other related deposits such as key deposits (i.e., a refundable fee paid to obtain a key to the residence) are completely illegal in order to eliminate the possibility entirely.