The WiiU has been dead since the Switch released. Nintendo put out BotW on the WiiU because they hadn't put out a Zelda game on it yet and Switch supplies were short. I wouldn't say that it's hurt sales for the game for the Switch - BotW had an above 100% attach rate at launch on the Switch.
BotW was developed for the Wii U. They've been promoting it to fans almost since the console's debut. Releasing it on that system was them living up to their promise. It's just a shame that it turned out to be the console's final major release.
It's not entirely true they didn't put out any Zelda games for the WiiU, just not any "flagship titles that were WiiU exclusives." They rereleased The Wind Waker and Twilight Princess. Hyrule Warriors was a WiiU Zelda title but it wasn't a flagship action RPG title, it was a hack and slash.
(I also believe that Breath of the Wild was originally developed for the WiiU)