All the points Jeromy made in his first answer can be integrated when you view this from the perspective of Self Categorization Theory (Turner et al., 1987) or newer develoments in social psychology which link Social Identity Theory and Self Categorization Theory (Haslam et al., 2009). To be sure, what I am about to say refers to the situation that an individual does already identify with a certain group.
The basic idea is that within a social context, certain cues can make the membership with a certain group salient, which leads to self categorization as a group member (instead of categorization as an individual). This in turn will lead to a heightened awareness of and conformity to norms, values or behaviours that belong to the group. Certain behaviours might even be essential to the definition of that group, like in your example. To provide a (hopefully) more realistic example, certain health-related behaviours like eating certain kinds of foods can be a defining feature of group identity. Oyserman et al. (2007) showed that
Racial-ethnic minority participants view health promotion behaviors as White middle class and unhealthy behaviors as in-group defining (Studies 1 and 2). Priming race-ethnicity (and low socioeconomic status) increases health fatalism and reduces access to health knowledge (Studies 3 and 4). Perceived efficacy of health-promoting activities is undermined when racial-ethnic minority participants who identify unhealthy behavior as in-group defining are asked to consider their similarities to (middle-class) Whites (Studies 5-7).
So, certain norms, values or behaviours might be relevant to the definition of a group and thereby important for the social identity of a person. As an answer to your question, a term that might fit is Self Categorization.
Haslam, S. Alexander, Jolanda Jetten, Tom Postmes, und Catherine Haslam (2009). Social identity, health and well-being: An emerging agenda for applied psychology. Applied Psychology 58, 1–23.
Oyserman, D., Fryberg, S. A., & Yoder, N. (2007). Identity-based motivation and health. Journal of Personality and Social Psychology, 93(6), 1011.
Turner, J. C., Hogg, M. A., Oakes, P. J., Reicher, S. D., & Wetherell, M. S. (1987). Rediscovering the social group: A self-categorization theory. Basil Blackwell.