The characters aren't entirely ill-suited, about one-third of them have had trainings to deal with the matters at hand.
The characters have the skills necessary, but constantly clash with each other and have personal issues which would normally disqualify them from anything more vital or dangerous than operating a cheese grater.
They're what's available — either for lack of authority, or because the location is isolated.
The Big Bad poisoned the king, his knights and their squires, and his wizards; the princess, the pages, the stable boys, and the apprentice wizards are what's left.
The Hero gathers his team in his travels resulting in the group being anyone who would help him over people suited for the job
Double Subverted: On the other hand, their quirks are — distinctive, and interfere with the mission on occasion.
Parodied: A want-ad is placed for heroes, stating that the requirements for the job include bravery, strong moral character, and either one major quirk or three minor-but-distinctive foibles.
Zig Zagged: The authorities are always trying to send new teams, which range from crack, well-trained teams to characters picked at random.
Averted: The team is constructed carefully.
Enforced: "The players are going to want to run their own characters; we need a scenario to fit them all in."
Lampshaded: "All groups of adventurers with no visible reason to stick together will be shot on sight."
Invoked: "Hey, everyone! Let's go take out the Dark Lord! Since none of us know each other or have the least in common, that's the best plan."
Exploited: "If we have no idea how these people would be able to work together, then there's no way the Dark Lord will be able to predict their moves either!"
Defied: "I'll take the best men I can get, and I'll train them until they work together!"
Discussed: "But sire, how do you expect a farmboy, his dog, the princess, a 100 year-old wizard, and a cave woman to save our kingdom!?"
Conversed: "This anime contains so many strange crazy things as heroes. I bet this team of Ragtag Bunch of Misfits will triumph despite Big Bad despite what the town cryer thinks."
Deconstructed: The team collapses from in-fighting, and several members become Turn Coats.
Reconstructed: With the traitors purged, the misfits are ashamed of their poor showing and pull themselves together. Plus one Turn Coat was their leader, the government official in charge, and they realize he was The Mole.