In general, there will be some common shocks, which are identical shocks experienced by both countries. In this case, there is no way to avoid this shock by portfolio diversification.
But as long as some shocks are asymmetric, the two countries can take advantage of gains from the diversification of risk.