Once Tolkien created a whole species of "Orcs" that creation ALSO brought with it the new moral quandary of why and how an entire people are evil and servants of evil. Which itself has unpleasant echoes in reality*. D&D has continued this on a larger scale, making, for example, singular monsters like the Minotaur or Medusa into species. This carries with it the same moral quandary.
D&D orcs are NOT Tolkien's orcs. There are similarities, to be sure, but they are very distinctly different. One of the big differences between Tolkien's orcs and D&D orcs is that D&D orcs are CLEARLY established to have free will to choose good over evil. They aren't inherently evil, there is nothing saying that any individual orc couldn't be lawful good and lead a moral and pious life. . .and in 3rd edition and later there's nothing to say they couldn't be a Paladin or Cleric of a good-aligned deity.
D&D orcs are evil because they have a culture that encourages evil behavior, and because the major religion in their society is veneration of an evil pantheon. . .but they aren't
inherently evil
The point of orcs, and similar humanoid creatures like bugbears or goblins, in D&D is a stand-in for human enemies. They are there so no human group has to be demonized, and so it's fairly clear at first glance what side they're probably on.
It's a convenient storytelling and literary shorthand. It lets DM's set the stage with fewer words and less time having to lay out the individual culture and motivations of some invading evil country or hostile nomadic tribes.
If an NPC says his farm was raided by orcs, PC's know pretty quick that he's the victim and that the orcs were the bad guys and PC's can almost certainly go after the orcs and defeat them and be heroes. If an NPC says his farm was raided by armed men. . .were they troops from the local Lord there to forcibly collect back taxes and going after those soldiers will bring down the whole Kingdom on you, were they some bandits and outlaws the PC's can kill with impunity, were they a raiding party from the next Kingdom over and going after them might start a war (or make the PC's heroes). . .it makes things more complicated.
For a lot of D&D players, they don't want super-detailed, super intricate stories, they want relatively straightforward narratives, and complicated NPC cultures and deeply nuanced NPC races don't facilitate that.
Humanoid foes like orcs are a nice literary and storytelling shorthand for things that would take a lot longer to tell, and require a much more skilled DM, than it does now. They're typically evil villains, but they do have free will so exceptions certainly exist and PC's cant presume that every last single orc in the world is evil, even if the typical orc warrior they run into in a dungeon isn't going to be on friendly terms with them.