Because some people think it looks cooler.
Thats the only reason, all other arguments are irrelevent as bayonets (which make any rifle type weapon into a handy-dandy polearm) exist.
Also, it allows close quater combat - most gamers don't, for example, want to play a game where you engauge fleeting targets hundreds of meters away, which is why games like CoD have you and the enemy blasing away at each other at less than fifty meters most of the time, games where swords (or other melee weapons) are used against modern or futuristic firearms simply take this to the extreme.
Thats the only reason, all other arguments are irrelevent as bayonets (which make any rifle type weapon into a handy-dandy polearm) exist.
Also, it allows close quater combat - most gamers don't, for example, want to play a game where you engauge fleeting targets hundreds of meters away, which is why games like CoD have you and the enemy blasing away at each other at less than fifty meters most of the time, games where swords (or other melee weapons) are used against modern or futuristic firearms simply take this to the extreme.