Alignment is and should be a Gameplay mechanic.
DnD isnt a highschool drama play, its a game
The problem is how this mechanic is implemented into a computer game.
Many games encourage the player (as in giving rewards) for selecting some options. The player will chose options that give the best gameplay reward, no matter if it makes sense for that character.
Some examples:
- In some games you get the maximum bonus when you are either as good as possible or as bad as possible but a small or no bonus if you are in between. You feel forced to select one side in the beginning and then always chose the option of this side to maximize the bonus.
- In BG1+2 you automatically max out reputation by finishing quests. I do not remember quests that you could in an evil way were you get the full exp for finishing the quest and you lose reputation for finishing the quest. Its a long time since I played so I am not 100% sure. I could never play those games with evil chars in my party because I always end up with max reputation.
- In P:K some players complained that they had to select lawful evil options for their paladin in order to remain lawful. Selecting the good option would have made them neutral good and they lose their paladin abilities.
- There are tons of examples where players say: " I have to select alignment x because in this dungeon I find a great armor that can only be used by alignment x." or " Ability A of class B works great in combination with ability C from class D, but class B must be evil and class D must be chaotic so I have to select a chaotic evil char." and so on.
Maybe its possible to create real roleplaying were players do stuff that makes sense for their char in PnP.
But in a computer game everything that can happen is progammed and some options (including alignment options) will be better game mechanics wise than others.
Many players know situations were they find a great item but nobody in the party could use them.
So far I have not seen a computer game were alignment matters for the personality of the character and it is not just a requirement for some items and classes but it does not matter otherwise.