Sounds like you basically got there yourself in your last paragraph, but I think a term that might lead you down some fruitful reading is "motivated reasoning." It's often about maintaining some other desirable property (e.g. being accepted by their community; keeping a particular friend group; holding a belief system), and rationality takes a backseat to maintaining that property.