In many films and TV shows, most of which are horror or survival or both, there is always that one hateable character. Although most are female, there are also many male ones as well. That one character who does all the dumb things, the one who almost gets the group killed. In addition, they also tend to be the annoying and/or self-righteous one. Despite this, the group still hangs on to them, rather than abandoning them or even downright killing them if at that point. One example is Andrea from the Walking Dead(tv show). My question is, why have that hateable character, even having the group keep them despite the burden(s)?
Drama, it's as simple as that.
Let's take your example, for instance. While the characters living within the Walking Dead universe have no previous history of or familiarity with zombies, us in the real world do. We know the 'rules' of zombies, and most of us, if pressed, would be of the opinion that surviving there would be ... well ... trivial, if not simple.
Acquire shotgun, pistol and machete. Acquire food. Stay out of sight and be quiet. Mostly be QUIET. Profit.
So, what if the gang over at WD didn't have an Andrea? Life would be too simple. Everyone working together against... zombies. Ho hum, sigh, too simple. Zombies are not dramatic. They simply aren't. There are too many of them to be invested in them as the 'bad guy'. And once they get used to the 'rules' of them, life is simple. Survival is as well.
Enter someone we SHOULD be rooting for, who should be a 'good guy', a compatriot. Except they are terminally clumsy and trip over things, making noise. Or worse, actively, yet clandestinely, working against the party for personal gain. Immediate drama.
We, here in the real world, tend not to get so into a fictitious universe to be able to truly understand or fear something also fictitious as a zombie, or whatever. But a dumb blond, or a clutzy nerd, or something else we can relate to... that provides the real drama.
Think about it. Does the group sneaking through a new town make you nervous for them, in and of itself? No, of course not, they're all capable. Now add the too stupid, too noisy, too clumsy person who is relatable and shazzam! Now we are wondering if they'll make it this time, or all get eaten.
Re-reading this, I don't think I'm as clear as I could have been at the beginning. Let me use another zombie film, to explain. (I shouldn't, because it's not just zombies, but can be anything, like the bugs in Starship Trooper, for example). Remember Will Smith's I Am Legend? Zombies. Here we have a single, very capable individual trying to survive. In fact, he was, and doing so nicely. Holed up in his fortress he had no problems surviving against the mass hordes of zombies. If the movie left it at that, it would have been boring, because, yes, there were millions of them, but ho hum, no problem....
And then the 'smart one' appears. Now he has a challenge. Can he beat it. Should he? Drama.
A group of survivors will have very little problems, and a lot of ho hum. Put in a boss bad guy and it gets interesting. Put in a person on the 'good team' who purposefully, or advertently, is working against the team as well, and DRAMA!