See my edit- it's not an either/or, all/or nothing proposition.
It's like claiming a behavior is ONLY nurture or ONLY nature. Clearly behaviors involve both components. Unless you're a dualist. In which case, I'm not really interested in discussing this any further.
No its not which is why not all members of a group are endogamous; that's not to say some aren't. The Parsis in India for example, have almost disappeared, a small group to begin with, and highly highly endogamous. All rebels instantly excommunicated. Today, they would be considered racists. Strangely, although Persian in origin and strongly identity conscious, they consider themselves Indians. India being what it is, they were permitted their exclusive behaviour, now after 1000 years, they have (slowly) abandoned it and marry non-Parsis.
The key of course, is the perception of acceptance. I don't know any Parsi who, inspite of 1000 years of exclusion from Indians within India, consider themselves anything but Indian.
IMO, their tribalism and exclusiveness was a reflection of their persecution; their assimilation is a reflection of their identification with the tribe (which has nothing to do with any of their tribal aspects)
I mean, look at Farrokh Dhondy (better known as Freddie Mercury); who woulda thunk he is pure Iranian?