Racism and bigotry aren’t logical positions, but emotional ones. People have an emotional need to be part of a group and feel included. If the group a person joins is antagonistic towards other groups then the person will internalize that and become bigoted. The dislike of other groups becomes a part of their identity and belonging.
The documentary Behind The Curve illustrates this pretty effectively. They follow some flat eathers around and interview them and they all say the same thing. They love being a part of the group. They didn’t have a group before and now they do. Their beliefs keep the group together and they’re not going to get rid of them just because the beliefs can be proven to be wrong.
The desire to be a part of a group is strong enough that people will believe anything as long as it gets them some friends. There isn’t anything wrong with that unless the beliefs of the group are harmful and hateful.