A Central Bank may decide to fix the exchange rate of its currency relative to another currency to (1) anchor expectations and provide stability, (2) reduce fluctuations in import prices for local consumers and producers, and (3) reduce exchange rate risk in foreign financial transactions.
Fixing the exchange rate comes at a cost, however.
First, the central bank must always have enough foreign reserves stockpiled to maintain the exchange rate peg. If the exchange rate is fixed at a level that is far off from its market value, then this could create distortions that could build up over time and result in a balance of payments crisis.
Second, an economy cannot have a fixed exchange rate, an open financial account (where money can flow in and out of the country freely), and an independent monetary policy all at the same time (this is the monetary policy trilemma). To maintain a fixed exchange rate, either the central bank has to give up its monetary policy independence (i.e. it is entirely focused on exchange rate policy and has no room to pursue other policies to affect lending, inflation or growth without putting its exchange rate peg at risk) or the country has to close its financial account.