The main reason is that the Japanese yen is a low-interest currency. During the financial crisis, the interest rates of high-interest currencies are falling. There is interest rate risk. Low interest rates are a safe haven and are sought after.
Because of the long-term The yuan is a low-interest currency, and there are many arbitrage transactions. That is, borrowing Japanese yen to invest in other high-interest currencies. When the high-interest currency fails, the arbitrage must be closed and the Japanese yen must be paid back quickly. This also intensifies the appreciation of the Japanese yen