It's not weird. They had to print many many CHFs to satisfy the demand for deposits in Switzerland.
They then exchanged them for the USD they now hold.
As for infrastructure/whatever, SNB then went on a massive shopping spree in equities, ~100 billion or so.
They must be the absolutely best managed central bank in the world.