It's better to be friends with people who accept you for who you are and for what you believe. Why would I be friends with people who reject my beliefs and who treat my opinions as invalid because they disagree with me? That is not friendship.
Otherwise, you surround yourself with fair weather friends and social acquaintances who aren't interested in having a real friendship with you. Why invest in friendships with people who reject you? That doesn't make sense.