Why people use them
A CEX is the easiest way to turn money from a bank or card into crypto and back. It offers deep liquidity, many trading pairs, derivatives and customer support, and it is usually licensed and does identity checks.
Custody risk
When your coins sit on an exchange, you own a claim on the exchange, not the coins themselves. Hacks and failures such as Mt. Gox and FTX showed that customers can lose everything. Proof of reserves reports help, but the safest habit is to withdraw what you are not actively trading.