Luigi should have been happy besting Mario in his second eponymous adventure. He could've spent his career scampering around in the forest trying to rescue squirrels from killer robots, after all (the link is to a video for which embedding is disabled by request).
Early Sonic games were so much more mind blowing (for votaries of the series, the video linked to shows the play of one of the best in the world) than Mario games were, but the cast--not just protagonists and antagonists, but items as well--of the latter were more endearing and memorable. Sonic zips around and pinballs into things. That's it. Mario picks up and throws things, hurls fireballs, and not only pounces on things from above but also bops them from below. He forfeits pure speed for versatility. Just as basketball is more engaging to watch than 5ks are, so Mario bested Sonic.
Further, the hedgehog is an ugly animal, and fighting a human to rescue delicate woodland creatures did not create affinity for it. As Agnostic has argued, kids don't tend to take the environmentalists' misanthropic bait. An every man-boy fighting a dragon-lizard to save a princess--now that's compelling stuff!
As is the case in virtually all martial arts action movies, if the bad guys ever had the brains to bum rush the hero at the same time, there'd be no saving Marian. How ironic that for so many years the Mario brothers tried to knock out the tyrant who inadvertantly allowed them to flourish: