I could write an entire essay about this.
The way you live, grow up, and the people you're around are many ways your political ideas can be influenced, along with your free-thinking. If you lived around republicans with very strict ideas, you will likely grow to be the same. That isn't always the case though, many people grow their free thought and can change their ideals. Taking me for example, my family on my father's side is mostly conservative and republican, while my mother's side is democratic typically. I grew up heavily Christian and I gained my ideals, I now don't believe in much and I'm left-leaning (I don't identify with any democratic or republican titles.