The first superhero teams were brought together by that powerful force, cross-marketing. The Justice Society of America, the Seven Soldiers of Victory, and similar groups were simply collections of second- or third-tier comic-book heroes owned by one conglomerate and unable to carry a whole magazine on their own.
As overall superhero comics sales slipped in the late 1940s, companies dropped their top characters into team books as well. Timely/Marvel built the All-Winners Squad around Captain America, the Human Torch, and the Sub-Mariner, and DC let Superman and Batman spend more time with the Justice Society.
Meanwhile, comic-book giants Joe Simon and Jack Kirby had developed another type of team: a bunch of boys with complementary personalities. There could be, for example, a tough kid from Brooklyn, a jolly fat boy, a rich toff, a hilarious black stereotype, and so on. The Young Allies included the sidekicks of Captain America and the Human Torch as well as "normal" kids, while the Boy Commandos shared Detective Comics with Batman. Such groups could even be made up of men, as in Red, White & Blue; the Blackhawk Squadron; and the Challengers of the Unknown.
After DC began the "Silver Age" of superhero comics by resurrecting the Flash, Green Lantern, and other old names in new forms, it also restarted the superhero team with the Justice League of America. Like before, that was simply a conglomeration of heroes, brought together because the company saw sales potential in putting them all onto one magazine cover.
Over at DC's rival Marvel, the chief executive saw the sales of that Justice League book and challenged editor Stan Lee to come up with something similar. Lee and Kirby then created the Fantastic Four, conceiving of a whole superhero team at once and giving them powers that complemented each other but personalities and interrelationships that promised drama. And the result was an immediate hit.
Soon writers created more superhero groups: the the Doom Patrol at DC, and X-Men back at Marvel. Marvel tried combining second-tier heroes in the Avengers, but discovered the formula worked better with characters who didn't have their own magazines but had interesting chemistry. This was the atmosphere in 1965 when DC created the Teen Titans by grouping the young sidekicks of its stars.
By that time, comic-book editors had stumbled onto some useful rules for creating these sorts of groups:
- You need someone who's super-strong: the Thing in the Fantastic Four, Robotman on the Doom Patrol, Mr. Incredible in the Incredibles. Often this guy also has a rough, tough personality, but in the original X-Men, Lee went against type by making the super-strong member, Beast, an intellectual.
- You need someone who can fly: the Human Torch in the Fantastic Four, Negative-Man on the Doom Patrol, Angel in the X-Men. It helps with some missions, and it just looks cool.
- You need a female. As soon as DC realized that females could be superheroes, it had added Wonder Woman to the Justice Society (she served as secretary during meetings). The Justice League also had Wonder Woman, the Fantastic Four had the Invisible Girl, the X-Men had Marvel Girl, the Doom Patrol had Elasti-Girl. But it was a rare group that needed more than one female member.
Until then, Wonder Girl had simply been a young version of Wonder Woman, as Superboy was to Superman. Through some sort of Greco-Roman god magic, Wonder Girl and Wonder Woman had appeared in comics together, but they weren't supposed to be separate characters. No one at DC bothered to complain when Wonder Girl was shipped off to play with the boys, though.
Because the Teen Titans desperately needed her. None of the boys was super-strong. (Well, Aqualad has above-average strength since he has to withstand underwater pressures, but he also dries out quickly, so it's a wash.) None of the boys could fly; in the first issue of Teen Titans, Robin, Kid Flash, and Aqualad parachuted into South America while Wonder Girl just flew down from the plane.
And, of course, Wonder Girl was a girl, so she added something to the group dynamic. Like a consuming interest in hairstyles! The power to totally mystify teenage boys! And someone else for Robin to order around!
And we wonder why so few girls enjoyed superhero comics back then.