Q:

Why is Desire (almost) always portrayed as a villain?

While the Endless are beyond human morality, it is quite easy to notice the general characters of them: Destiny is cold and formal, Dream is moody, Delirium is happily childish (and really, really insane), Despair is quiet and withdrawn and Death... well, and Endless that is personification of something arguably worst that can happen is actually everyone's best friend.
And then we have Desire, that is a self-centered scheming bitch/bastard:

Not mentioning her plan that almost killed Dream - she/he raped sleeping Unity Kinkaid knowing that Dream will have to kill her granddaughter Rose and therefore spill her sister/brother blood and get torn by furies.
Why did Neil Gaiman decide to turn her/him into villain? Why (in universe) is she/he so mean towards Dream?

A:

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.

A:

I agree with Radhil but would add that the Alianora story (also fleshed out more in Overture) is another example that Desire is not the villain he/she sometimes seems. (For my part, I mostly think of Desire as a he.) When Dream is imprisoned, Desire, out of all the Endless, is the only one that helps him.  Yes, her help is double edged (as all her gifts are) but Alianora does free Dream and does love him. The fact that Dream treats her badly afterwards is not Desire's fault. It is a test Dream failed.  Desire is always testing him.
I think it is because he/she sees him the most clearly. They are a lot alike and it's irritating that he's seen as this proud and mysterious king when he's clearly done things much worse than anything we see Desire do.  He doesn't have to have the reaction he does to Killalla of the Glow kissing Sto-Oa but he does. He doesn't have to sentence Nuala to hell but he does.  Desire wants to unmask him for who he is both to the other Endless but mainly to Dream himself.
This not to say that Desire doesn't have his/her own ugly impulses but he/she seems to be aware of them while Dream is oblivious to his own.  And it is these same impulses in Dream (taking Lyta Hall's child, treating her so badly) that lead to his demise but finally transforming him into a more enlightened version of himself.
Conversely, the events of Overture also add a little sting back in Desire's tail.  After Gaiman took such pains in the Kindly Ones and The Wake to insist that Desire had no hand in Dream's death, that has now been slightly, indirectly undone.  It is Desire that comes up with the plan to save the Universe (the ship, the 1000, etc.) while knowing that only Dream can execute it.  By following the plan, Dream leaves himself weak enough to get captured thus setting in motion Lyta Hall's and Daniel's fate.

