It is the trade-off between security (as Sly has elaborated) and flexibility to convert BTC into hard (cough!) currencies.
Say you are some miner from the old days and keeping some thousand BTCs somewhere in your private wallet maybe you want to buy a nice car and you need $30,000 you could go to mtgox (or any other exchange) and sell these 1000 BTCs and retrieving the money (several limitations apply)
On volatile BTC exchange rates you may want to sell immediately however the transfer from your private wallet to the exchange account takes some time (around some hours(!) sometimes), maybe the rate has dropped already and you do not want to sell anymore.
You are buying this flexibility with the risk of a compromised account or a hacked website (MtGox was already hacked in the past,though no user bitcoin accounts we stolen ).
So keep a strategy how and where to transfer your BTCs
I usually hold only a limited amount outside my private wallets These are the BTCs I want to sell