Well, first of all, the game didn't do THAT bad in sales. No, it isn't selling 10 million like Mario Kart or New Super Mario Bros, but it still sold better than the avg third party title, at nearly 850,000 units.
There's a few reasons we can look at why the game didn't sell more. One, the series is traditionally a handheld series. And considering the fact that they opted to put a traditionally handheld series on a console could have hurt its sales. It seemed to be the case when the series went from handheld to console on the gamecube with Warioworld. Second of all, the game wasn't exactly deemed to be a 'hit'. Like I said before, its not something like Mario Galaxy or Smash Bros Brawl. It was just made to cater to those fans who already liked the series. And more than any game in the series, that's what it does.
Lastly, and this is going to be the hardest to hear, but despite the games excellent animations and attention to detail in the graphics department...it was a somewhat low budget title compared to other outings from Nintendo. In fact, you could even go so far as to say it feels like something the developers may have done as an 'in between' project. Now I'm not going to go as far as to say the game is bad...but it is rather repetitious and lacks much of the polish of other platformers from Nintendo in the gameplay department. Its also somewhat short for the main game, putting a lot of the gameplay into replaying all the levels for the 'extra' content. This may have deterred from its sales.