2 Factor auth on multiple devices
The verification code is available on all trusted devices. Since you're logged into iCloud in System Preferences, your Mac is a trusted device and can receive verification codes.

With other services that use 2FA, you've set up Authy, but you only have Authy on your phone. If you installed a 2FA code generator app on your computer, then you would be able to generate codes there too, as you can with iCloud.