Very often they are passed down father to son. Here is a recent paper by Avdeenko and Siedler:

This study analyzes the importance of parental socialization on the development of children’s far right-wing preferences and attitudes towards immigration. Using longitudinal data from Germany, our intergenerational estimates suggest that the strongest and most important predictor for young people’s right-wing extremism are parents’ right-wing extremist attitudes. While intergenerational associations in attitudes towards immigration are equally high for sons and daughters, we find a positive intergenerational transmission of right-wing extremist party affinity for sons, but not for daughters. Compared to the intergenerational correlation of other party affinities, the high association between fathers’ and sons’ right-wing extremist attitudes is particularly striking.

Here is a sentence from the paper:

Young adults whose parents were very concerned about immigration to German during their childhood years have a 27 percentage point (60 percent) higher likelihood of also expressing strong concerns about immigration as young adults.

This of course should make you less confident of your anti-immigrant views, if indeed you hold them. Similarly, the intergenerational transmission of particular religious beliefs is also a strong reason not to be very confident in them. If you get your religious beliefs from your parents and other relatives, through whatever mechanism, rather than from God, well…why are your parents a more reliable source of knowledge about this question than anyone else’s parents?