This happens if investors foresee that a government is running an excessive deficit, causing it to run short of liquid assets or "harder" foreign currency which it can sell to support its currency at the fixed rate. Investors are willing to continue holding the currency as long as they expect the exchange rate to remain fixed, but they flee the currency en masse when they anticipate that the peg is about to end.