My working hypothesis is our brains are always learning - literally everything. We learn our concept of time from our experience with it. We learn our concept of a relationship with another person from our experience with them. If someone comes into our life easily - relative to other relationships - our brain associates them with less value. It’s also horrible logic.
Edit- as for whether someone likes you: people accept, overlook, and tolerate more aberrations from normal/good treatment from people they value or like. If they’ll accept little of your aberrations then they’re unlikely to ever like you - run for the hills. That’s one of my tricks for likeness.