I believe it can come from both, but it is entirely up to the individual. Our background and experience can have an influence on our views, but we can choose to let the influence dictate our beliefs or not. I know of people who believe exactly like their parents do, but I know of others that have radically different views. I grew up in an inherently racist area (not over the top, just subtle), but I have chosen not to be prejudice. We can succumb to the influence from others, or we can chose to be free thinking and make our own decisions.