There's several reasons why it's logical from a business point of view for Nintendo to release games like Mario 3d, Zelda 3d and Metroid 3d, even though they sell less than Wii series and (some) 2d games. To understand them you have to look at the big picture, not each game in isolation.
Diversity is one aspect, and Nintendo uses it to make the consoles appeal to a wide range of consumers. Another way to this is making each game appeal to a broad audience, hence most games are e for everyone.
Another aspect is that Nintendo understands that the console needs its iconic games that stand out from the huge amount of mediocre (=good, but not spectacular) games. What those games are depends on your taste in gaming, some people see Wii Sports and Resort as those, some Mario Kart, some Galaxy, others Zelda TP, some even Wii Music. Without each of those games, a portion of the Wii install base wouldn't be there and buy other games, too.
So those games sell a lot of smaller games, and thus it's not only financially ok but necessary to have them. I think the fact that Nintendo hardly ever lost any money in this business even in last place and now accumulates huges piles of it in first place validates the correctness of this business model.







