The main reason why most people couldn't see Switch selling 100m+ is because they've been working with wrong premises, much like you. If someone doesn't understand why the Wii and DS were successful, everything would look like an uphill battle where Nintendo success is an outlier while the Wii U and 3DS gen would be perceived as the norm for Nintendo's performance in the console business. But it's exactly the other way around: Nintendo success is the norm while the Wii U and the 3DS are the big outlier generation.
This already shows in the financial stats where Nintendo had consistently made profits in the video game business, starting as a developer of arcade games and Game & Watch devices, all the way through the Wii and DS generation. It's only during the years of the Wii U and 3DS that Nintendo faced a challenge to generate profits.
For console sales, Nintendo has had ten major platforms before Switch. These are the NES, GB/C, SNES, N64, GBA, GC, DS, Wii, 3DS and Wii U. Seven of them won out against their respective competitors while only three did not. This (70%) is the highest success rate in the console business, followed by Sony at 50% before the current generation (Switch, PS5, XSX|S) is factored in - which will be another Nintendo win. PS1, PS2 and PS4 were winners while the PSP, PS3 and PSV were not.
15 years ago the prevalent perception of the console business was that Sony is king and that Nintendo's days as a hardware manufacturer are numbered. This flawed premise subsequently created the hardcore/casual fallacy, because all these people who were wrong had to come up with an excuse to avoid to admit that they don't understand the console business. Nintendo was very open about their strategy with the Wii and the DS, but willful ignorance made video game producers, gaming journalism and gamers alike miss it all until they were left dumbfounded that everything played out much different than they had anticipated.
One major component of the Wii and DS strategy was that Nintendo made a big effort to trim the fat of modern video games and get the purity of classic consoles back. Instead of long intros and tutorials, games were easy to pick up and play, and were instantly fun instead of having to rely on dreaded phrases like "You have to give the game 2-3 hours, but then it starts to get good." This original core value of video games was increasingly neglected by the video game industry, so Nintendo reaped the rewards with the Wii and DS. It should be self-explanatory that this original value was what made video games a major branch of the entertainment industry to begin with; it is what created gamers in the first place. Anyone who understands this shouldn't be surprised that the Wii and DS did not only bring in new gamers to the console market, but also made tens of millions return who had quit console gaming due to the increasing waste of time it had become.
In the alternate version where the Wii and DS were successful because of casuals, these dumb gamers left Nintendo for smartphones and tablets, completely ignoring that Nintendo themselves made major changes to their strategy with the Wii U and 3DS where the emphasis of both consoles was put on things that were very different from the Wii and DS. Anyone who fell prey to this alternate telling of history was blindsided by Switch, but for the few who can tell a difference between strategies, it wasn't a surprise because Switch offers many parallels to the Wii and DS. The fans of classic console gaming have once again returned to Nintendo, so the conclusion should be that Nintendo will consistently be successful as long as they cater to this market. This is because the other two console manufacturers can't perform this job, so there's a big segment of console gamers for whom it is Nintendo or nothing.
These are the people, the classic gamers, I credit the most for Switch's success because they've shown up early and threw their spending power behind it. They don't lack money, because they are obviously adults already. You can tell that Switch's success isn't driven by PS and Xbox gamers because the payment models for games that are being embraced differ so drastically. What you have on Switch is gamers who are paying for quality, so Nintendo keeping game prices high isn't an issue because the games are worth the money, so people are willing to pay for them even years later; the same attitude applies to DLCs where large expansions to games are prefered over individual bits and pieces, let alone loot box nonsense. On the other hand, on PS and Xbox game prices deteriorate fast and companies boost their bottom lines with business models for additional purchases that are lifted essentially straight from smartphone games.
That's something that people should really be thinking about, because it turns beliefs upside down; it's not the Nintendo console gamer that is cheap and casual, rather it's the PS and Xbox gamer. You can also tell this from gaming forums in the way of Switch's biggest sellers being discussed and talked about a lot whereas IPs like Call of Duty, Grand Theft Auto and FIFA (the bestsellers on PS and Xbox) are commonly ignored by the more dedictated console gamers you find in these places. For PS and Xbox there is a notable disconnect between what sells the most and what is being praised the most, so one has to wonder why people cling to a notion that the gamers who drive Nintendo's success are somehow lesser than the gamers who drive PlayStation's success and Xbox's stay-around.