That is how it works if you have Messages sync enabled. Other MFAs are also synced on Apple devices: TOTP and Passkeys are synced via iCloud Keychain to all iPhones and Macs using the same iCloud Keychain account.
I believe google synced TOTP and Passkeys between Android devices using same google account, i did not test this though.
Obviously one can disable sync, but imo synced MFA is what most want anyway.