In some ways, this is a kind of emotional laziness -- rather than coming up with a new response to a thing, we fall back on the old pattern. In other ways, it's a genuine way of feeling, because we can't separate ourselves from our pasts, and what has come before naturally informs how we, who we become.
But if I respond to an experience with Amy because of a past, similar, interactions with Bill, it may get in the way of having a fully formed relationship with Amy.
I think it's impossible to avoid this, and the question is more about how to be aware of these patterns. When I get grumpy with Amy, at least being able to identify some of it as grumpiness associated with past stuff with Bill is a start in being able to interact authentically with Amy. The next trick would be to get away from the pattern entirely, at least in being with Amy, but I'm not really sure how to do that, yet :)