Unlike animal behavior, human conduct is motivated (at times, at least). There is a reason for what people do or refrain from doing. The motives may be good or not so good, selfless or selfish, beneficial or harmful to ourselves or others.
To motivate a character, a writer (and, indeed, a director and an actor) needs to know not only what makes people tick in general but also something about the character he or she is depicting or portraying. For writers, such understanding is enhanced by knowing the character’s past, or back story. What happened in the past influences who we are and what we do in the present.
Some of the series’ characters seek redemption: Giles, for an irresponsible youth that included practicing dark magic that led to a friend’s death at the hands of a demon that he helped to summon; Angel, for the misery, suffering, and pain he caused his many victims when he was a soulless, bloodsucking creature of the night; Jenny Calendar for her betrayal of Giles, Buffy, and Angel.
Others are motivated by their desire to live normal lives, including their attempts to fit into the larger world and to be popular with their peers (Buffy, Xander, Willow, and, each in her own way, Cordelia Chase and Anya Jenkins).
Still others--and, sometimes, the same characters, at different times--are motivated by a desire for revenge: Buffy, Angel, Jenny, and Willow.
Spike is often motivated by either hatred or love, or, sometimes by both, for the same character, at different times (Drusilla and Buffy, for example), but he is also energized, at times, by vengeance, boredom, loneliness, or sheer mischievousness. More than any other character, except perhaps Giles’ childhood chum, Ethan Rayne, Spike is the show’s trickster.
Buffy is a show that, although its writers recognize genetic inheritance as a factor in human behavior, also insists, rather passionately, that human conduct stems, more often than not, primarily from characters’ exercise of free will. They are what they do; they do what they are, but they both are and do, more often than not, because of the choices they make. They elect to take this action or that or to refrain from doing one thing or another. In the process, from the raw material, so to speak, of their genetic inheritance, they create themselves. Their choices are what make them realistic, believable, likable, or hateful characters, despite the fantastic nature of the series itself.
Buffy is by no means perfect; especially after season five, it is easy to detect flaws, both minor and significant, but the series remains, although uneven, worthwhile television, and its creator and its talented stable of writers have much to teach other writers about how to create complex, dynamic, and intriguing characters whose actions stem from moral conflicts, existential problems, the conduct of others, the social demands upon them, their own natural abilities and weaknesses, and, most of all, their own free will.