Ultimately, one way or another, they come to recognize you as a sign of food coming, and learn that you do not pose danger. They dont "like" you, they just use basic instincts.
But we still like to pretend they actually like us.