Absolutely agree it's a bug in many situations, but I've also seen the case where I'm surprised I can't sneak attack, and the reason turns out to be the enemy is in the shadows and hard to see properly. I think many of those cases fall under the 'both advantage/disadvantage' situation mentioned above, but sometimes they don't and it might be reasonable to not be able to sneak attack.
It would be nice if the UI were more specific about why you can't sneak attack.