This is a bit of speculation but it might answer the reason.
I remember seeing after the 2008 financial crash that the Swiss Franc was causing problems for Switzerland because it was getting too strong, being sought as a currency to take refuge in. Keep in mind that the US dollar, despite the US's role in starting the 2008 crash also appreciated quite a bit, because it became a safe currency.
Switzerland seems to have taken steps to push down its currency, in order to keep its exports from becoming uncompetitive.
One standard way to make a currency stronger is for the central bank to buy it (that's often called defending a currency). Conversely, the way to drive it down would be to sell that currency.
To sell a currency, you need to accept another currency as payment.
So my guess is that in selling all those Swiss Francs Switzerland ended up with lots of foreign currency and have not had a good way to get rid of it.
From New York Times, 2011- Swiss Central Bank Tries Again to Weaken Franc:
LONDON — The Swiss National Bank announced new monetary measures Wednesday to weaken the surging franc, which it regards as greatly overvalued.
The announcement checked the recent surge in the currency against the dollar and the euro. But analysts said it would be hard for the Swiss authorities to restrain the currency unless global markets stabilized.
Investors have been eager to hold the franc, pushing it to new highs, even though they receive negative real interest rates for doing so. That reflects their confidence in Switzerland as a stable economy and a lack of faith in other currencies.