I wouldn’t say that being racist is necessarily about the inability to think logically or rationally. It’s sometimes that, of course, but sometimes it’s because they just never tried to think about it. Their life experiences just never put them in that situation.
But most often, I think, it’s because they can think logically, have tried to think logically, but the conclusions would make them feel less superior and thus they encounter a mental block. In other words, it’s about insecurity, first and foremost.