Every DM has their own reasons for allowing or not allowing that.
I avoid D&D itself as much as possible, but in other RPGs, I typically have some idea of the range of player characters I’m interested in supporting. And if there’s more than one, whether or not I want them to have a chance of getting along when they meet and/or try to do anything together. Unless all the players characters are coordinating to get along, then an “evil” character is more likely than most to lead to discord between the PCs sooner or later, possibly immediately. Sometimes that possibility is ok or even intended, but often not.
But even if one tries to indulge evil characters, even one PC acting by themselves, it tends to lead to a fairly different, often unpleasant, type of game. The last time I really indulged such a request, in doing the preparation for the game, I ended up changing my mind and deciding not to do it, because it ended up being such a horrible situation that I stopped being willing to run it, before we even really started playing.
Another consideration, getting back to D&D itself and one of the many reasons I avoid it, is that “Evil” characters don’t really make a lot of sense. They tend to be a poorly self-consistent conceit, which becomes more apparent the more one engages it. That bothers me, though people willing to play D&D must necessarily have a certain tolerance for nonsense. But for example, to roleplay an Evil character, the question naturally arises “why is this person “Evil” – what’s that really about? That’s an interesting question to me, but I find D&D’s premises and ideas about that fundamentally unsatisfying.
On the other hand, roleplaying characters who do make sense to me, and who end up doing quite a bit of evil, but in ways that make sense to me, can be very interesting to me. As long as it’s in an RPG system that interests me, e.g. GURPS.