Well whatever it lacks in practical value it must make up for it (to a certain extent ) due to it's psychological effect.
I mean cocking a gun, not THAT intimidating, but when I was playing Resident Evil 4, hearing that chainsaw rev up... you can't help but think what it could do to you. And that scared this shit out of me... in a game!?!?
Much like the flame thrower, a very impractical weapon in terms of range, bulk and amount of "shots" but I couldn't think of something I'd be more afraid of in the trenches though flamethrowers like most psychological weapons have fallen out of use.
The problem is not that they aren't effective, but they are TOO effective, everyone focuses their fire on the guy with he flame thrower. US Marines fighting in the Pacific in WWII had disproportionately high death rate when they had to man a flame thrower and god help any poor flame-trooper who was captured alive.
But he single biggest problem with a chainsaw as a REAL practical weapon is close-quarters combat is so rare any close combat cannot be too heavy or it won't be worth the weight, so only a small knife or shovel (that has other uses) can be justified.
Of course in games it is an accepted trope that you can always inexplicably carry a literal metric ton of weapons, equipment and ammo with no speed penaly so in that case a Chainsaw is not so unreasonable.
Another problem though is the main way that melee weapons are effective is if they are used with the element of surprise or stealth, though revving up a chainsaw will likely shock the hell of the enemy, maybe even prompting them to surrender, it is hard to sneak up or charge on their blind side. With a chainsaw they will hear you from rooms away and be ready and waiting.
Overall, I'd say a simple bayonet is more effective, even in a modern warzone.