If you get hacked than its your own fault. If you play smart and don't do anything stupid, you can avoid getting hacked and lose your money.
Exchanges do/can get hacked. So that is why everyone recommends not to store your coins on an exchange for a long time. And also always choose a very trusted exchange when trading coins.