Not sure where the surprise is..
1- The Wii U was - sales wise - a failure. In other words not a lot of people bought it. The switch however is already a success, so for most people, this is a NEW game. When it was released is irrelevant.
2- The success of the switch plays a factor in this as well. Mario games is almost always an insta-buy. It being a Mario game, the only racing game on the system at the time I believe (excluding fast RMX which also is technically a rerelease of the Wii U game), and one of the first games to be released on the switch plays a factor in this.
3- The PS4 game serves a specific audience for this genre. Mario kart however appeals even to those that are not into racing games. Multiplayer is also a factor of interest for these type of games.
4- This one is my personal opinion, but I tend to believe that most gamers worldwide are mostly kids (yes adult gamers are a lot as well but I believe kids are much more). I would think a switch has a more of an appeal to them than The PS4, and if they have both, I would think that MK8 is more of a fit than HZD.
Now every single point I mentioned might not be a reason enough, but when you consider them all together, I really don't see the surprise..