There are two reasons for that. The first is that the villager isn't actually sick and is, instead, weakened. The details screen must say they are sick before healing will work. The other is that sometimes the villagers get a bit frisky when they shouldn't. They pretty much have minds of their own.

If the villager won't stop embracing the patient, just perform the healing with a different villager. Even unskilled villagers can heal other villagers.
