Desire gets what it wants.
What Desire wants that is most relevant to Dream's story is to take his/her/its stuffy older brother down a peg or three. By necessity that makes it a villain, or at minimum, an antagonist.
(by default, my brain makes Desire a her, but I will try to stick to the neutral pronoun)
The earliest (in-universe chronological) beginnings of their rivalry is displayed in Endless Nights. In the story that focuses on Dream, The Heart of a Star, it shows Dream falling for a mortal named Killalla, bringing her to a meeting of stars, and actually thanking Desire for its influence. Although many of the Endless here are portrayed differently to show how they have evolved over time, Dream and Desire are pretty static. Dream is formal, and Desire is capricious. The story ends with Killalla falling for a star instead of Dream, which Desire finds funny and Dream does not, their rivalry begun.
It's strongly implied that Desire continues to play this "prank" on Dream over and over again, with relationship disaster after disaster through the millennia, not understanding or not caring that Dream will not change and only carries the hurt from these experiences. This escalates (Nuala, which feeds Season of Mists) and escalates (the story Three Septembers and a January) and escalates (Rose Walker / Dolls House). It's not like Desire isn't busy doing its own thing, but this is the side that Dream gets.
It is mentioned and demonstrated in the series, repeatedly, that getting what you want means getting what you once wanted. It is subtly implied that Desire understands this by the end, where it clearly gets what it wants and cannot find the same glee in the having that it did in the wanting. Whether it knew that all along but did not understand, will change now that its rivalry is ended, or continue to be a villain to various parties, is left for the reader to imagine.
Adding to this answer, and offering a different side of Desire, is Sandman: Overture...
... during which Desire is secretly helping Morpheus all along, masquerading as one of his aspects (The Cat of Dreams), in order to save the universe. Not only does Desire consider itself critical to continued existence and therefore immediately got involved, but Dream had flat out refused its help out of pride or their rivalry, and managed to bring about The End. Twice. Desire had to keep using time-shenanigans to figure out a solution where it could help everything work out. Unfortunately, this is treated as a last minute reveal, the nature of the plot forces Desire to forget it happened, and last and most wrenchingly, what does stick is the idea of getting Morpheus to kill a Dream Vortex that is family. So in the same breath, Desire helps save existence and conceives the plot of Doll's House. Your mileage may vary, but the story does go out of its way to point out that both siblings take their duties way too seriously, and are far more alike than either wishes.