A Martial will never have 2, much less 3, more attacks though. Thief Rogues have 3 as of level 3, Martials (other than Rangers) catch up at 5 while Rangers pull ahead by 1, Fighters catch up to Rangers and pull ahead by 1 at 11. Paladins and Barbs *never* pull ahead. If they did pull ahead by 3 attacks per round, sure, but they don't. And of course the sneak attack does more damage than hitting them with a greatsword once, since it does the same damage as them hitting with the greatsword even before the sneak attack dice are applied, give or take 2 damage! Add in 18.5 damage and it can't *help* but deal more damage. And nearly 20 damage isn't nothing, especially when it's added onto someone who is again getting the same number of attacks.

Rogues can:
Dash and still get 2 attacks, which combined with their range lets them chase down and eliminate fleeing targets before they pull in more adds.
Take out priority targets on the other side of difficult chasms or inopportune surfaces.
Disengage while surrounded and still get 2 attacks against whatever was surrounding them
Take out multiple disparate targets on opposite sides of the battlefield.

I'm playing a sharpshooter Rogue in a multiplayer campaign, my damage dealt is so much higher than any other player it borders on absurd. If 5d6 isn't anything, don't tell that to the storm sorcs, who think that dealing 8d6 damage 3-5x in a turn while burning up all their daily resources will result in "damage numbers in the 500s" and is the height of power XD Meanwhile I'm just chilling dishing out 100+ damage round after round, every round, while our martials often have to sort out how exactly they're going to get to and try to damage the correct targets, and end up just hitting unimportant targets at their feet instead.

As far as scouting, Barbarians will never be as good as Rogues. They don't have expertise available, which in my case at least as of 6 meant expertise in Perception. They're more MAD (Multi-Attribute Dependent), wanting good Str, Con, and Dex, before worrying about Wisdom, while a Rogue just needs good Dex and Con and can have a decent Wis just for the boost to Perception and thus scouting. If they find the trap, they don't have expertise in Sleight of Hand, and Reliable Talent. meaning their minimum result is likely something around an 8, while a Rogue's minimum result is no joke likely to be somewhere around a 23. If they fail to find the trap, Danger Sense isn't as good as Evasion, and Rage won't help with the damage taken, meaning more resources expended keeping them healed. Oh and they don't have *at will invisibility* like a Rogue does. They might need fewer instances of super jump applied to them, granted, but on balance at the end of the day there's just no comparison in their usefulness as a scout.

Now the whole point was, that's ok! If you need them to fill the scouting role, they can certainly still do so. They'll do fine in it and the party can muddle through even if they're not as good at it as Rogues are. And same with Rogues in melee - if they need to do it, they'll be fine, even if they're not as good at it as Barbs are.