The subject of this message is the external transfer of numbers between two different networks. In most PAY networks any credit remaining on your account is not given to the competitor that the number is transferred to. Hence the very sensible suggestion that before the account closes, any remaining credit should be donated to charity rather than just becoming "unearned profit" for the network that you are leaving.
I suspect you're thinking of sim swap, which is not really a number transfer, just a new sim taking over service on an account which already has a phone number and credit. A different matter entirely as it doesn't involve any network other than giffgaff.