Partly quality of titles, but moreso brand recognition. Sony drops its notable franchises in favor of new IPs far too often (though sometimes it's not their choice, as was the case with Crash Bandicoot).
Nintendo's titles sell mainly due to the brand name that they built up throughout the NES and SNES generations, but they have the quality to back them up, so the name isn't tarnished. Why is it that Twilight Princess can move over 5 million units, while the amazing (and eerily similar) Okami struggles to move 500k across the best selling consoles of all time? Brand name.
Of course, if you don't have the quality to back up the name, sales will dwindle over time. This is the case with Sonic, but it took a few bad games for sales to get as low as they are now. If the next Super Mario sucked, it would still sell at least two million.
Of course, Sony's titlesgenerally don't cater to as wid ean audience as Nintendo's, either. God of War is an excellent example of this. The first God of War only managed to sell 3.21 million units last gen, but it was the best selling linear hack n' slash game across all platforms by a good margin. The genre just isn't that big, so despite the qulity of the title, it never really achieved blackbuster level sales.







