They have enough first party games which only release on their hardware that people are willing to buy a Switch for nintendo games, and another gaming device for everything else.
Sad part is that I would be willing to pay a substantial mark up to be able to play some of those first party titles on my PC, but since my kids have a Switch I just settle for using it. So even if I don’t think I’d buy a console just for their games, I’m gonna end up buying it anyway and Nintendo still wins.