First and foremost: SMS-based 2FA is in fact bad. It's not very secure (SMS is sent over poorly-secured channels and often leaks in a bunch of places) and greatly raises the risk of SIM-hijacking attacks. If you can, you should use almost any other method even before considering the issue when traveling.
There is not any technical reason why SMS can't be read online. Indeed, it can be, with some mobile providers (notably Google Fi). The only requirement is that your mobile service provider implements the feature, either through a web-based or app-based interface. Most providers haven't bothered to do this, but they could.
There's also the option of using one of the many apps that will sync messages between your phone and your PC, such as the "Your Phone" built into all recent Windows versions. However, these apps only can see what your phone sees; if the phone is off, out of service, or using a different SIM than normal, it won't see messages sent to your usual number. The thing described above, where the mobile service provider gives access to the messages, is different; your phone doesn't even need to be on or functional.
2FA typically uses SMS (bad), an authenticator or push-notification app (OK), or a hardware token (good) because these are all considered a "thing you have". Meanwhile, passwords - including both the password to the 2FA-protected site, and the password to your email - are considered "thing you know". Multi-factor authentication should always use different types of factors, rather than just multiple instances of the same type of factor. (There is also a third type - "thing you are" - which is generally biometrics like iris or retina scan, fingerprint, voiceprint, etc.; unfortunately, there's no reliable way to use those over the Internet so all online biometric authentication is really a "thing you have" situation where the device holds an authentication token or key, and releases it after you prove your identity to the device.)