Because the interest rate of Bank A is fixed, the value of A is constant, and the interest rate of Bank B is floating, so the value of B is variable and determined according to the market interest rate at that time, so Bank A has realized that the interest it pays avoids the interest rate risk, because when the interest rate falls, he pays less (B) than he should have paid (A).
I don't know about China's swap transactions, but they are popular in Europe and America, and are generally conducted at libor interest rate.