A few things here. First of all. Tomb Raider WAS profitable, it just didn't sell as highly as Square-Enix wanted it to; they wanted it to carry their entire quarter, essentially, which it wasn't able to do. But it was a success, hence the sequel.
If the WiiU wasn't floundering then Bay2 simply wouldn't have happened because Nintendo wouldn't need the game to help them sell the system.
Bayonetta 2 was announced before the Wii U was even released, so at the time it wasn't floundering. Nintendo picked it up as a way to attract hardcore gamers to their system. They'd also by that time developed a strong relationship with Platinum.
Another question: Do you think Nintendo would give Platinum Games a higher budget than, lets say, Mario 3D World? Even after the super weak sales of Wonderful 101? Think about it...
As for Nintendo, you didn't answer anything. Why would Nintendo put more money in Bayonetta 2, after Wonderful 101 bombed, than something that is a sure hit like Mario?
You can't. It doesn't make sense.
Bayonetta 2 was budgeted and far in development long before Wonderful 101 bombed. As for Nintendo not putting money into games that aren't Mario, not true. Games like Xenoblade have a far larger budget than Mario 3D World. Mario games aren't particularly expensive to make, especially now that they've pretty much dropped the free-roaming elements.
But Nintendo does release big-budget games. They release small-budget games and then they have their big games like Zelda, Xenoblade, and (likely) Bayonetta 2. The game does not look cheap to make. Certainly it looks far more expensive than the first one. The fact that they're porting and including the first one as well shows that Nintendo is clearly willing to spend the money.
I just hope they market it effectively.