Nobody really knows why good chemistry happens and why the lack of it can ruin a team. It’s like a recipe for a great dish. Include the wrong ingredients and you’re liable to spit it out. Put the right ones together and it’s delicious.

Some baseball followers believe in a simple theory: Winning breeds good chemistry and losing brings on bad chemistry.

As was the case with the 1993 Phillies, who lost to the Blue Jays in the World Series, it can defy logic.

“You know, I’ve been on bad teams that you got along great with everyone,” said former Phillies first baseman/outfielder John Kruk, now an analyst on ESPN’s “Sunday Night Baseball.” “I was on a good team in Philly that there were times when fights broke out in the clubhouse more often than not. But everyone said we had such great chemistry.

“I think the bottom line is it all comes down to winning. When you’re winning, you overlook certain things. When you start losing, you try to find things of why you’re not winning. This guy showed up late for BP. This guy doesn’t come out for BP, spends all his day in the trainer’s room. That’s when you’re losing.”

Orel Hershiser, another ESPN analyst, was on the great 1988 Dodgers team that won it all.

“Tommy Lasorda used to say, ‘We can fight behind these clubhouse doors, but once we leave here we got to lock arms.’ All that matters is when you cross the white lines that you are on the same page. It doesn’t mean that you go to dinner, you ride in the same cab to the ballpark. The fact when you get on the field, everybody wants to win, show up, concentrate,” Hershiser said.

Infighting was certainly the case with the great Yankees teams of the 1970s, yet on the field, respect took over. The team jelled and won under the sometimes impossible demands of “The Boss,” George Steinbrenner.

The A’s, who won three straight championships from 1972-74, created an “Us vs. Him” mentality, uniting against owner Charles O. Finley. It was a group of young, talented players who were brought together by Dick Williams, a tough manager who often clashed with Finley.

“I often thought Charlie created that ‘Us vs. Them’ on purpose,” said Phil Garner, who played for the A’s during their title run, was on the all-time chemistry team — the 1979 Pirates — and managed the Brewers, Tigers, and Astros.

The A’s had great players and their talent offset all obstacles.

“They would kid each other, get on each other in a good-natured way,” recalled pioneer player agent Jeremy Kapstein, who represented several top A’s players.
“There was a unifying force — Finley. It was all of them against Charlie. There were so many gamers on that team, blue-collar type guys who just came together for the same purpose.”

By the time Garner joined the A’s full time in 1975, the team was still very good, but “I remember one writer who covered us writing ‘the A’s have had 14 fights this season and all of them are in their clubhouse.’ It was rough, but the big thing was, on the field those things were forgotten. The fighting was almost therapeutic. Everyone got their frustrations out.”

The 2004 Red Sox are an interesting study in good chemistry. They had come off a devastating Game 7 loss to the Yankees in the 2003 ALCS when Grady Little left Pedro Martinez in too long. Yet the ’04 Sox acted like it never happened.

There was a new manager, a new top starter in Curt Schilling. The Idiots — Kevin Millar, Johnny Damon, Mike Timlin, Alan Embree — kind of took over the persona of the team. Having fun became the top priority, and while it was wild and unorthodox — very similar to the 1993 Phillies — the loose feeling in the clubhouse spilled over onto the field. Terry Francona just went along with it.

“I think we just had strong veteran players who just understood what it took,” Francona said. “We got on a roll and people just started to believe in one another. It was a beautiful thing to see. But that was chemistry at its best.”

“I think we were able to come in and get into the flow of what Johnny and Kevin had created there,” said Dave Roberts, who was part of an outstanding roster/chemistry tweak by general manger Theo Epstein at the trade deadline. “I don’t know that you’ll ever be able to explain it or describe it or that you’ll ever duplicate it again, but it existed and we were all engulfed in it.”

Asked how the two favorites in the National League West compare this season, one NL executive said, “Check out the Dodgers — a lot of good players but bad clubhouse guys. And then look at the Giants, position by position, and you tell me.”

The inference there is the Dodgers have more talent, but the Giants, who have won two championships in the last three years, seem to have the right group of guys.

“I think it just comes down to your manager and coaching staff being able to identify what is needed on that team with that group of people to create good chemistry,” Giants GM Brian Sabean said. “There’s no magic formula except that if your people have been around long enough and they understand what it takes, you’re bound to get it right.”

And don’t forget, Sabean also oversaw successful Giants teams with Barry Bonds and Jeff Kent, whose reputations weren’t exactly stellar. Some of Bonds’s self-absorbed antics and the all-consuming attention paid to his quest to break the home run record may have cost the Giants more chances at a championship.

The 2012 Red Sox simply had the wrong mix of players, not necessarily from a performance aspect but from a tone-setting one. Carl Crawford’s whining, Adrian Gonzalez’s clubhouse politics, Josh Beckett’s surliness.

The 2001 Red Sox team also had a toxic mix with Carl Everett, Jose Offerman, Ugueth Urbina, and Mike Lansing, resulting in one brush fire after another. Dan Duquette always said winning breeds good chemistry, but that team seemed doomed with too many distractions to overcome.

Garner has a very interesting take on team chemistry. He said it can start with middle relief.

“Good chemistry is built in those situations where you might be behind by three runs and you bring your middle relievers in and if they can hold things where they are and your team feels it can come back and win, that does so much for team chemistry you wouldn’t believe,” Garner said.

Garner also believes you have to have “alpha dogs” in the clubhouse. When he managed Houston he had Jeff Bagwell and Craig Biggio, who set the young players straight. In Milwaukee he had Robin Yount.

“When there’s veteran leadership, chemistry develops,” Garner said. “When you don’t, it can go the other way quickly.”

BostonGlobe.com complimentary digital access has been provided to you, without a subscription, for free starting today and ending in 14 days. After the free trial period, your free BostonGlobe.com digital access will stop immediately unless you sign up for BostonGlobe.com digital subscription. Current print and digital subscribers are not eligible for the free trial.

Thanks & Welcome to Globe.com

You now have unlimited access for the next two weeks.

BostonGlobe.com complimentary digital access has been provided to you, without a subscription, for free starting today and ending in 14 days. After the free trial period, your free BostonGlobe.com digital access will stop immediately unless you sign up for BostonGlobe.com digital subscription. Current print and digital subscribers are not eligible for the free trial.