They know that the combination of extremely high quality first party exclusives combined with hugely popular IP is going to move units even if they're "overpriced" as devices to play any other games.
When my daughter's Switch 1 died, I had the choice between the 2 and the Steam Deck, and I chose the Deck. It's got a ton of games and the cheap Steam back catalog is great, but... no Mario? No Zelda?
I won't pretend I wasn't tempted to own both.