Nations must be judgmental of outsiders when they violate the walls and the rules and the dynamics of that specific nationality. It is a matter of self-preservation.
When what is being guarded is valuable and righteous, it is rational; however, when what is being guarded and when judgements are made to preserve cohesion for its own sake it is considered cultism.