Well, but your assumptions are skewed in favor of the rogue. It's pretty irrational to assume a fighter with a 10 strength, especially at high levels. Strength is a primary stat for fighters, just as dexterity is a primary stat for rogues. The more accurate way to look at would be as follows.
Assume that each character started with a 15 in their primary stat at level 1 (str for fighter, dex for rogue) and a 14 on their second primary stat (con for fighter, int for rogue). The fighter places a 12 on his dex, and I'll give you the benefit of the doubt and say the rogue puts his 12 on str instead of wis or cha. At level 20, each has a base 20 for their primary stat from attribute increases by level. You used 1d10 for the fighter's weapon, and we'll assume he has exotic WP just to get rid of his 1.5 str bonus for two-handing it, and the rogue has weapon finesse. The rogue has a dagger. Just to keep things simple, they're both +5 cold-iron weapons and aligned for good. The fighter would just be an idiot to not have WF and WS for bastard sword. Also, both have a +6 stat inflating item for their primary stat (final stat 26). We'll assume no crits, since that's more favorable to the rogue.
Now we pit them against a Balor (CR20). He has an AC of 35. So, on a full attack action, the fighter has 4 attacks around at +34/+29/+24/+19 for 1d10+15. Assuming he has the flank so your rogue can have sneak attack, only the last attack is likely to miss more often than 50% of the time. I've broken down damage from each attack as an average of his damage roll times the % chance to hit.
Full attack = 19.475 + 17.425 + 12.3 + 7.175 = 56.375 average damage for a full attack.
The rogue has a +28/+23/+18 for 1d4+6 + 10d6. Still assuming the flank, his full attack breaks down as follows:
Full attack = 34.8 + 21.75 + 10.875 = 67.425 average damage for a full attack.
Admittedly, the rogue is doing better, but not much better and we did make some favorable assumptions on his part. Of the two of them, the rogue is the least capable of withstanding a return full-attack from the Balor (lower hps and AC) and has just made himself the more likely target. Not to mention that we didn't account for the rest of the fighter's feats or the fact that the rogue's damage output is fully contingent on getting the sneak-attack. If he's denied it for any reason (e.g. balor's in a corner so can't be flanked), his damage output goes to (5.95 + 3.4 + 1.275 =) 10.265 while the fighter's output remains at a respectable (19.475 + 15.375 + 10.25 + 5.125 =) 50.225.
I'd say the fighter's greater survivability and his consistent damage balances out with the rogue's relatively squishy body and situational damage.