Because a pool's liquidity belongs to whoever holds the lp-token, a launch team can withdraw it and leave holders with a token that cannot be sold. Locking those LP tokens in a time-release contract removes that specific ability for the locked period.
A lock is weak evidence, not proof of honesty. Check the amount locked as a share of total pool liquidity, the expiry date, whether the contract is a known locker or one the team wrote themselves, and who can still mint new tokens. A 30-day lock on 20% of liquidity is theatre.
Locks also do nothing about the other exits: a large team allocation sold into the pool, a mint function, a token-blacklist-function, or simply the price falling. See soft-rug for the version that needs no contract trickery at all.
Related: liquidity-pool, lp-token, rug-pull, soft-rug