At the time Sonic looked amazing and Nintendo outside of America and Japan doesn't tend to do that well. Megadrive was more popular in Europe for example.
Nintendo also had their kiddies policy. 80's gave us Mario and Hulk Hogan kids grew up. Sega had Mortal Kombat with blood and Stone Cold Steve Austin was popular. Then Sony turned up and reamed both of them.
Sonic also came out before SMB at least outside of Japan and Sega was also cheaper. Cheapest console always wins console war. Sony got reamed for a while by Xbox 360 it was cheaper and had deeper library for a few years there.
Here everyone had Sonic. One person had a SNES. The console war was very lopsided by region. Japan and USA were Nintendo's strongholds Sega broke into that.