The lower the friction of in-game interaction, the easier you make griefing, harassment, predatory interactions with minors, etc. Most platforms are trying to balance this out and find a "sweet spot" where it doesn't get in your way too much and you don't get too much bullshit. But importantly not zero bullshit.
Nintendo has just pushed that lever as far as it can go in the other direction. You can't do much, and it's not easy, but you're essentially never going to interact with strangers without going out of your way to. Which almost completely eliminates those negative interactions.
The jank of online play, dropped connections, the godawful performance of the e-shop, all valid targets. Friend codes are an intentional choice though and one very clearly aligned with how they see themselves.
Nintendo has been woefully behind in this area for over a decade. You still need friend codes just to play online, and universal cross-game invites are not a given. There are also no guarantees that current Switch games will be playable on whatever comes next - while Nintendo usually does backwards compatibility for one previous generation, they made a clean break from Wii U to Switch.