I only see two reasons for Nintendo doing this: One - they are stretched too thin and are giving development to Sega in exchange for Sonic promo/money split. Two - Sonic is (perhaps) bigger in Europe than Mario and right now WiiU desperately needs to get some traction in Europe.
Normally this would be nonsensical to Nintendo as Mario Kart sells 20-40m as opposed to Sonic Kart which is lucky to break 1-2m.
I really can't see that Sonic is bigger in Europe than Mario. The bolded part is what worries me, at least if they don't make an additional Mario Kart U afterwards. Not to mention that SEGA would demand royalties from the game, and for a game that is set to sell probably at least 15 million just 20% is a lot of money lost for Nintendo.