Liquidity in centralized exchanges is provided by the exchange itself and by traders on different coins pairs, while in decentralized exchanges anyone can participate in providing liquidity and take some profits for it.
Liquidity is powerful, it's actually the creator of the market itself. And when you lose in trading, the broker/exchange at times can earn from all the losses if they are the liquidity provider. Or not, if they are not. In other words, at times, they are not the ones you lose the money to (they never provided the liquidity), this is unless the broker/exchange is a market maker which is a trading concept that is common with traditional market trading, and not crypto. If the broker/exchange is such that passes your deals directly into the raw market pool, then you lose the money to the liquidity pool and to the pocket of all those who are making the pool functional. This is what they make us believe in exchange and the reason why they do not like withdrawals when there is an issue that could cause panic withdrawals.
If this happens, it might be the end of the exchange since the liquidity would run dry through the exercise just like what happened with FTX even though they are faulty as well. This is just to establish that companies and their associates can provide liquidity, and so are the customers. And this determines how the brokerage/exchange would run, especially during the time they didn't plan for.