One answer modern science gives us is that they weren't all wrong: a lot of the written accounts of vampirism are accurate descriptions of events that actually took place. It's just that the interpretation was flawed.
Some historians now suggest the real impetus driving belief in vampires was plague. Plague follows the same course originally ascribed to vampires: a single member of a community dies, after which the immediate family withers away one by one. The neighbors are the next to go, and so on. Victims of the original "vampire" exhibit a mounting fatigue, as if their very life were being drained from them.
Vampires may also have acted as a self-reinforcing myth. In the days before embalming, bodies were simply buried in porous wooden boxes. Under these conditions, natural decay causes a gradual bloating due to the release of gases. It may even cause blood to emerge from the corpse's mouth as the lungs are squeezed -- both sure signs of vampirism. To top things off, driving a stake through the chest of a body in this state will indeed cause it to emit an eerie cry -- not because it is still alive, but by the sudden force exerted on the lungs.
So, people who tried to rid their towns of vampires could be said to have been acting rationally, given the limited medical knowledge of the time. The remedy never worked, of course --which is why vampires are still with us to this day.