In both cases, the exchange pays the gas fee to send the tokens to the hot wallet. That's why the exchange sets a "Minimum deposit" amount. Under that amount, it is not worth paying the gas fee to move the tokens to the hot wallet.
The minimum deposit on most exchanges is only around $10 and the cost to sweep $10 to a hot wallet is currently approaching $10. So it would essentially cost the exchange the same amount in fees as the minimum deposit. This doesn't even take into account the fact that an exchange only generates around 1% revenue from a $10 deposit (in trading fees) - so the real cost to the exchange to deal with the "minimum" deposit may very well be over 100 x the deposited amount?
How is this sustainable?