Bayonets belong in WW1 or before. WW2 is modern warfare. Case closed.
It's Company of Heroes. If you want real life, go play Men of War!
Aherm.
Actually
you still occasionally hear about bayonets being used in combat in the 21st century. Iraq / Afghanistan and such. There were certainly a few bayonet kills in WWII! It's by no means "common" tactic, but sometimes it's the right tool for the job.
They would probably be extremely, unrealistically effective in Company of Heroes, because most units have a range that is one "screen" or less, which if you measure the scale compared to the units means that almost no fighting takes place at distances greater than maybe 50 meters. Like literally snipers can't shoot farther, and only something like a JagdTIger can go farther. All balistic weapon ranges and LoS are extremely heavily and unrealistically nerfed. This has some interesting side effects, like Flamethrower ranges NOT being nerfed in proportion to gunfire ranges making them ludicrously effective as a standard frontline unit, unlike in real life when they were extremely niche. A knife would probably be unrealistically useful as well for the same reason - it only takes a handful of seconds to close from "maximum range of rifle" to "literally adjacent, knife range".
Give me a 5 man squad with 1.5 armor and instakill knives, it will be super OP