There are usually several aspects to keeping different species together in what we term a community tank. Barbs are very active fish, and many will easily turn to nipping fins of especially sedate fish. Generally speaking, barbs should not be combined with sedate fish (gourami, cichlids, Betta) because of the barbs' tendency to active swimming, as this can unsettle sedate fish. And, sedate fish frequently have longer fins, which even peaceful species of barbs can find tempting. These are generalities, and individual fish may behave differently for any number of reasons, but as they are generally applicable to the entire group of fish we should assume they will apply and not set up a risk that may well fail.
The other thing is that numbers in the group can affect behaviours and temperaments, as can also the tank size. Shoaling fish like barbs, shoaling meaning they naturally live in very large groups of their own species, tend to become more aggressive (meaning, increased aggression beyond the norm for the species) when there are fewer of them together, and in smaller tanks. As an obvious example, a group of 30 Tiger Barbs (a species particularly prone to fin nipping) in a 4-foot tank will usually leave each other alone, but a group of four in a 20 gallon tank will almost certainly nip each other to death.