Why Countries Keep Foreign Currency Reserves

Central banks typically hold cash in currencies from other countries. But why?