Why should liquidity be locked?
If liquidity is unlocked, then the token developers can do what is infamously known as "rugpull".
Once investors start buying token from the exchange, the LP will accumulate more coins of established value (e.g., ETH or BNB). Developers can withdraw this liquidity from the exchange, cash in all the value and run off with it.
Liquidity is locked by renouncing the ownership of LP tokens for a fixed time period, by sending them to a time-lock smart contract. Without ownership of LP tokens, developers cannot get liquidity pool funds back. This provides confidence to the investors that the token developers will not run away with the liquidity money. It is now a standard practice that all token developers follow and this is what really differentiates a scam coin from a real one.