Well, it seems to me that usually (read: USUALLY) the gym leaders have duplicates because they only use pokemon which you could have obtained up to this point. Often the first gym leaders are exempt from this--you can't get but so many Rock types before you fight one gym. But look at B/W:
Gym 1: Lillipup and Monkey - You can't get any other Grass, Fire or Water-type by this point, so they put in a Lillipup instead.
Elesa: 2 Emolga - Other than Blitzle and Emolga, what Electric-types could you have by this point?
Drayden/Iris: Fraxure and Haxorus - There aren't Deino before you fight them, so they don't have one.
Now, for most E4 members this seems stupid, but Hoenn (the biggest offender with Glacia and Phoebe) didn't have all too many Ice or Ghost-types. They had to use duplicates. They "fixed" this in D/P by having trainers like Candice, Volkner and Flint use pokemon not of their type. I'd rather have them use duplicates than run around with Medicham, Ambipom and Lopunny and such.