I believe there is good in it. It gives people a sense of unity and a strong loyalty to one's unit. There are, of course, negative aspects to the matter just like nationalism, religion and et cetera.
These sorts of clustering bring about with them both positive and negative facets; But, for me, the sense of pride and belongingness brings forth is generally for good one's identity.