Umbridge was evil in part because Rowling based her on a real-life person she very much disliked:
In an essay for her website Pottermore, released to mark Halloween, Rowling says the inspiration for Umbridge was someone “whom I disliked intensely on sight”. The novelist has not revealed the person’s identity, but did write that she had been her teacher “long ago ... in a certain skill or subject”.
“The woman in question returned my antipathy with interest. Why we took against each other so instantly, heartily and (on my side, at least) irrationally, I honestly cannot say,” Rowling continued, noting the woman’s “pronounced taste for twee accessories”, including “a tiny little plastic bow slide, pale lemon in colour”, which the novelist felt was more “appropriate to a girl of three”.
“I have noticed more than once in life that a taste for the ineffably twee can go hand-in-hand with a distinctly uncharitable outlook on the world,” Rowling writes in her Pottermore essay, recalling a time when she shared an office with a woman fond of “pictures of fluffy kitties”, who was also “the most bigoted, spiteful champion of the death penalty”.
“A love of all things saccharine often seems present where there is a lack of real warmth or charity,” Rowling writes, adding that Umbridge was “one of the characters for whom I feel the purest dislike”, and that “her desire to control, to punish and to inflict pain, all in the name of law and order, are, I think, every bit as reprehensible as Lord Voldemort’s unvarnished espousal of evil”.
As for aspects of her past that influenced her, it seems that her half-blood heritage, and its origin in an unhappy marriage, led her to cling more strongly to the idea of pureblood ideals and a fictional pureblood ancestry:
Dolores Jane Umbridge was the eldest child and only daughter of Orford Umbridge, a wizard, and Ellen Cracknell, a Muggle, who also had a Squib son. Dolores’s parents were unhappily married, and Dolores secretly despised both of them: Orford for his lack of ambition (he had never been promoted, and worked in the Department of Magical Maintenance at the Ministry of Magic), and her mother, Ellen, for her flightiness, untidiness, and Muggle lineage. Both Orford and his daughter blamed Ellen for Dolores’s brother’s lack of magical ability, with the result that when Dolores was fifteen, the family split down the middle, Orford and Dolores remaining together, and Ellen vanishing back into the Muggle world with her son. Dolores never saw her mother or brother again, never spoke of either of them, and henceforth pretended to all she met that she was a pure-blood.
From a Doylist perspective, I believe Umbridge was meant to represent the banality of evil, to borrow the subtitle of Eichmann in Jerusalem. She is not someone who actually seems to be actively evil so much as that she's cruel and petty, and desperate to hold onto her position. That, combined with her loathing for her blood roots, leads her to back Voldemort and the less savory parts of Pureblood society.