Nonsense. Apple does nothing to prevent you from installing WhatsApp, Signal, FB Messenger, or any one of dozens of other messaging services which also don’t allow third-party interop with their protocols!
There’s nothing anticompetitive or even out of the ordinary going on here. You can install competitive services on an iPhone at any time.
WhatsApp, Signal and FB Messenger are all available with feature parity on both iOS and Android devices. Beeper is able to sell subscriptions by reverse engineering entirely due to this not being the case with iMessage.
Considering that Apple has opened up third-party apps to do autofill for things like passwords (I autofill password fields from Bitwarden on iOS all the time), this seems a lot less like an advantage they're gating to their app and more like a potential feature they just haven't shipped yet because it has no use case at the moment (since right now nobody sends 2FA codes over any platform other than SMS). If it became widespread to use WhatsApp, Signal etc. for sending 2FA codes, I'm pretty sure Apple would add it.
There's not really much other system integration with iMessage either, other than some Siri stuff I doubt sees much use. It's surprisingly disconnected from the rest of the operating system.
Apple also does nothing to warn you about the insecure nature of sending sensitive messages via the SMS/MMS protocol the default messaging app uses to reach non-Apple hardware.
There’s nothing anticompetitive or even out of the ordinary going on here. You can install competitive services on an iPhone at any time.