According to a number of sources, including Grammarist, "Birds of a feather flock together means people of similar interests, background, ideas or characteristics will often congregate or hang out with each other, people who have similar ideas or values tend to stick together. In nature, many species of birds travel in flocks for safety and companionship. Like many proverbs, only the first part of the idea is often quoted, birds of a feather, with the expectation that the reader or listener can supply the rest of the phrase for himself. The expression birds of a feather flock together can be traced to a 1545 work called The Rescuing of Romish Fox, written by William Turner: 'Byrdes of on kynde and color flok and flye allwayes together.' Whether the proverb was in common use before this time is unknown."
This pithy saying certainly seems to be true when it come to people, but when it comes to avian creatures, they seem much more willing to spend time with their fauna comrades who may not be their same bird type; as evidenced by the photographs directly above this posting as well as the ones immediately below.
I'm well aware of the "hierarchy" within the animal kingdom and of the fact that species within species do not always get along; still when I witness unlike birds spending time together, it is comforting as well as a teaching moment for humans to do the same.
Fyi, Northern cardinals and house sparrows, the bird types featured in the first image accompanying this entry are featured in my book series, Words In our Beak.