Because she believed in her own righteousness
It is true that Death Eaters and other Dark Wizards are generally incapable of casting a Patronus.
According to the old Pottermore, of which the relevant part is preserved here,
While there is a widespread and justified belief that a wizard who is
not pure of heart cannot produce a successful Patronus (the most
famous example of the spell backfiring is that of the Dark wizard
Raczidian, who was devoured by maggots), a rare few witches and
wizards of questionable morals have succeeded in producing the Charm
(Dolores Umbridge, for example, is able to conjure a cat Patronus to
protect herself from Dementors).
It would seem that Dark wizards generally cannot cast a Patronus. Indeed, there may be risks if they attempt to do so, as with Raczidian being consumed by maggots. It appears, however, that a genuine belief that one is doing what is best for others may be sufficient.
It may be that a true and confident belief in the rightness of one’s
actions can supply the necessary happiness. However, most such men and
women, who become desensitised to the effects of the Dark creatures
with whom they may ally themselves, regard the Patronus as an
unnecessary spell to have in their arsenal.
This excerpt is a little vague, but it seems clear that what gives Umbridge the power to produce a Patronus is her whole-hearted belief that she is doing the right thing.
She seemed to be talking herself into something. She was shifting her
weight nervously from foot to foot, staring at Harry, beating her wand
against her empty palm and breathing heavily.
As he watched her, Harry felt horribly powerless without his own wand.
'You are forcing me, Potter... I do not want to,' said Umbridge, still
moving restlessly on the spot, 'but sometimes circumstances justify
the use...I am sure the Minister will understand that I had no
— Harry Potter and the Order of the Phoenix
Note how Umbridge is "restless" and moves around frequently. She is uncomfortable with the idea of using an Unforgivable Curse, which according to her beliefs is wrong. Although she is indeed a sadist, she tries to justify her behavior by appealing to the greater good: the safety of the school, the security of the Ministry.
This, I think, demonstrates that belief in the morality of her own actions that allows her to cast the Patronus charm.