I usually take into consideration what the party needs, but I won't let it completely dictate what I play. I do like to make my character last when necessary.
I joined a group one time that was composed of all Dex based characters so I rolled up a Str character. Was having an all Dex group a "weakness"? No not at all, but being the only Str character has it's perks. Ok guys, who wants this +2 Great Sword? Nobody? Well I guess I'll take it then
I played in another campaign that consisted of a Cleric, Druid, Monk, Ranger, and Fighter so I rolled up a high Charisma character.
I played in a group with two Life Clerics. That was.... interesting to say the least.
The last group I DMed chose classes that complimented each other, but they all chose monster races.
And finally, last year I played in a campaign where the DM absolutely insisted that there would be a Cleric and a Rogue in the group. He didn't care about what other classes were chosen as long as there was at least one Cleric and one Rogue. Weird.