Yes, SA2 had it's fair bit of stupid stuff in the story as well. I'm willing to admit that, and even somewhat that the game hasn't aged too well. However, the story isn't what made me say it's my favorite game in the series. I never said that I think SA2 is the best game in the franchise, only my favorite. By all accounts the Classic trilogy, Colors, and Generations are probably more solid games overall then SA2 is. But from my personal point-of-view, I just don't enjoy them as much as I do SA2.
You can say I have some nostalgia goggles for the game, but I'm still willing to admit it's faults and say it's not the best Sonic game in the franchise from an overall sense.
To be honest I don't even hate the Shadow the Hedgehog game that much. The only Sonic game I don't like unconditionally would be Sonic 06. I just laugh-off the story (Cause it's just more fun to treat it as a comedy drama instead of actually taking it seriously), and some things in Shadow did work well such as the weapons because they were useful in bringing down the enemies with large health-bars instead of having to constantly homing attack or punching like in Sonic Heroes (As well as 06). And Shadow also had the Grinding Mechanic improved over SA2's. There are some things that still give me gripes about the game, like it basically turning the Sonic franchise way too dark for the entire game just because Shadow's the main character when SA2 had a decent balance between lighthearted, over-the-top stuff the Sonic series is known for and the more darker elements of the game that only really take over when you get to the final story.
And while it's minor at this point, there's a hidden line that happens only if you take a long time on the final boss of the Shadow the Hedgehog game that implies that the Shadow in the Shadow the Hedgehog game as well as Sonic Heroes is still the same Shadow from SA2. I know it's kinda dumb to complain about this, but it just kinda ruins SA2's ending a bit when the Shadow that was in that game would just come back next game because of his popularity. But there was a way they could of had Shadow return but make sure it's known that he is not the same Shadow that was in SA2 as Heroes had those Shadow robots. It could have been more clever if the "brought back" Shadow isn't actually the original Shadow, and the original Shadow is indeed dead.