Rogues are pretty popular at my table, and I've put some thought into why there's a gap between that and the perception here. Comes down to a few things:

  1. We have a couple players who are enamored with what the Rogue represents narratively, without regard for its mechanics;
  2. Cunning Action is very useful (I have joked that it is addicting);
  3. Our DM puts a lot of work into making sure skill proficiencies are useful (we put a LOT of miles on Arcana in particular; and we're also blessed with robust homebrew systems for travel and crafting, both of which are great ways to turn skill proficiencies into combat advantages);
  4. Our DM also very rarely ever gives us a white-room encounter, and when secondary objectives are present the Rogues tend to be really good at accomplishing them (like the one a couple months ago that involved disarming bombs);
  5. We also get long rests quite infrequently, which lowers the value of long-rest resources like most spellcasting, and of course Rogues don't really care much about that;
  6. While Sneak Attack is bad on paper, it puts out big individual damage numbers, which feels good despite the inconsistency inherent to Rogue damage. One crit for 30+ tends to be a session highlight, even if the average gets dragged down by all the misses


IMO if you're making a tier list of most generally useful classes at most tables, you're going to have the most trouble selling Barbarian, Rogue, or Monk. I think Monk is probably the worst off of those three on average, but there's a lot of individual table reasons that it might be any of those (having lots of single-target fights favors Monk because of how big an action economy swing Stunning Strike is in those types of encounters; Barbarian is carried by Great Weapon Master in some respects, so absent that it can be a struggle, or against enemies that deal damage types Rage doesn't help against).

Ranger gets cited a lot, too, though I think it's propped up by a few things, such as the stellar post-PHB subclasses and Goodberry being a pretty efficient use of low-level slots.