The Rwandan genocide was Hutus killing Tutsis, yet the distinction between the two was very arbitrary and in a lot of cases boiled down to "the Belgians liked your ancestors more so declared you to be Tutsis".
Nazi Germany was allied with Japan despite all their racial purity rhetoric and some Jews were designated as "honorary Aryans". White supremacists today will gladly talk about the portion of white people who are "race traitors" and deserve to die.
Humans might have a natural tendency to favor those in their "own group", but exactly what that means is completely arbitrary.