It's because there's a self-perpetuating safety in it. This is one of the functions of religion: it benefits its in-group by giving them rules about the "right" way to behave, and those rules coincidentally favor conservative behaviors that have the side effect of stamping out individuality and making everything more "the same." And the self-perpetuating part is that groups of people engaging in more conservative, safer behavior thrive (at the expense of individualism). It's compounded by the fact that there's a moral judgment attached to your behaviors, which means it behooves people to be outwardly conforming in order to signal their inclusion in the morally superior group. Long hair on a boy? Well that sure is different, and as everyone knows, different is bad.