Exchanges get hacked all the time simply because they're hugely targeted by hackers. Obviously, because there's so much money to steal and that they could potentially get away scot-free.
While some of the current big exchanges that we have right now have remained unhackable(as far as we know), like Coinbase and Kraken, there's really no guarantee that they're not going to get hacked in the future. I mean, people think that Coinbase might be "unhackable" due to it's good track record, but people thought the same with MtGox and Bitfinex in the past. Well, we know what happened to both..
This list right here, will just unfortunately be added with more and more exchanges as the years go by:
https://cryptosec.info/exchange-hacks/Now, do you want to be part of the statistic of the lost funds from these hacks? Of course not! So obviously, the way to go is to simply just purchase an affordable hardware wallet, and store your funds there instead. Only leave funds on exchanges that you actively trade, and if possible, withdraw them regularly when you don't need to trade them.
But even then, do certain exchanges have a certain fixed amount that needed to be on the exchange so trading can happen? And if that be so, then how is it helpful to be on the exchange after being hacked?