Barring certain archetypes, a fighter's Weapon Training applies to a whole group of weapons, and a fighter can afford to utilize multiple quality weapons and fighting styles, but really, I'm yet to really be sold on the whole 'switch-hitter' Ranger thing. Typically, most characters are going to focus on either ranged or melee; specialization is usually preferable to generalization in 3.5/Pathfinder.
Fighters are nice in that they are always operating at max capacity regardless of the situation, with no need to keep track of limited use/day class features. A barbarian has limited rounds of rage per day, suffers status effect penalties when they're finished raging (until high levels) and has lower defenses while raging. They often have to weasel a way to get 'rage cycling' if they want to focus on 1/rage Rage Powers.
Similarly, paladins and cavaliers have limited use/day class features. Once they get into the upper teens they have enough uses to afford smiting/challenging every fight, but up until then they have to really worry about when to use their powers, and in all of the fights where they're not smiting/challenging they're basically a fighter with fewer feats, RP restrictions, and a few other minor bells and whistles.
Most of a ranger's class features are similar to a fighter's in that they're 'always on,' but again, there's situational elements to it. If you're going into a certain campaign well aware of the types of enemies you'll be facing, then a ranger might be a better choice than a fighter. But even most pre-written campaigns have a decent variety of enemy types, and without favored enemy bonuses a ranger starts to fall behind a fighter rapidly.
Sometimes, you don't want to mess with smiting, challenging, picking favored enemies, raging, spells... you just want to play a bad-ass. Some guy who is just damn good at swinging a sword or firing a bow. You might not fight Magical Beasts/Undead/what-have-you every day, but chances are you'll be fighting, and a fighter will be enjoying Weapon Specialization in every fight from the moment they take the feat.