hence, having a franchise is just for the public face of a game. Slap mario on something and it sells like hot-cakes.
*Short answer*
Mario was not a mere 'guest' of Doki Doki Panic (whereas he was a mere guest in SSX3, as much as Solid Snake is a mere guest in the upcoming Brawl title). The game was wholly mario-lized to be promoted as part of the official series. Elements found in that game have been re-used in the official mario universe.
Whether the game was out of line from a purist's view, has nothing to do with the title's classification as canon. the game is canon, because Nintendo sets the canons for its own games, and in this case it decided to give it the official treatment, and it has been treated as canon ever since - evident by the appearance of Birdo, Shy-guys and other characters in subsequent mario games.
*end of short answer*
It all really depends on what market you're addressing and what you want to achieve.
Mario has two sides to it.
A) Mario as in what it represents for platforming
and
B) Mario, as the franchise and all the luggage that it carries, the characters, environments etc, that appeal to a certain class of people.
For nintendo, starting something as a Mario project, means that they used key elements of the know-how and technologies powering the Mario line of games. So, having pikmin stem from mario does not make it a mario game because it falls under category A, and not B.
Nevertheless, using mario in a game, makes it a mario game,for the purposes of marketing it wholy or partialy (like SSX3, or the other EA games including mario). But classification of whether this game is a mario title or not follows from whether the game is a Pillar title or a mere Satelite.
No one would say that SSX is a Mario game just because it features him. And no one would expect SSX players to appear in a Mario universe. The appearance of Mario in this game is something of a guest appearance, making the game a Third party Satelite of the Mario universe.
On the other hand, the Pintas in Mario Sunshine , although new and relatively out-of-place, are to be considered part of the mario universe. Why? Well because the company made them appear in what I like to call, a "Pillar" mario title (as opposed to a Satelite title, like Mario party etc).
Following this reasoning, Super Mario Bros USA/2 is a Mario title, because it belongs to the Pillar titles of Mario, ie Platform games, and was even given the name 2 as in continuation of 1 and preceding 3.
Again, the fact that it was a different game does not matter. As forementioned, Pikmin started out as a different game. A mario game. No one can argue that it IS a mario game just because it started-out as one.
In the same way, by analogy, no one can say that Super Mario Bros 2 USA is not a mario game but a Doki Doki Panic title, solely because it was based on that title (the volume of the game elements used are immaterial in assessing the category).
Finally, even Wii sports *attempted* using mario instead of Miis in order to make it more appealing. This is an internal decision for nintendo, as was choosing to make pikmin a different game, and as was choosing to convert Doki Doki Panic into Mario USA.
For all OFFICIAL purposes, the numbering of the game (SMB2) , the use of the title (Super Mario Bros) and the re-use of characters and elements appearing in it in later titles, Super Mario Bros 2/USA is canon.
How it started out is none of our business after-all,
In the same way, Star Fox Adventure's Crystal has become canon because the game SFAdventures is considered to be in the official Pillar of the games, and not a mere Satelite.
Whether a game is better suited under a franchise is a matter of debate on the merits of each game, but NOT on the classification.