Since the invention of clip-fed firearms, bayonets have not been very valuable weapons. When reloading is the matter of flicking a lever (or of doing nothing at all for automatic weapons), adding a knife to the end of the gun does little good. It is easier, more effective, and vastly safer to fire another round than to attack with a bayonet. Bayonets are widely considered obsolete, and modern armies tend to phase them out- with good reason.
The only problem caused by this is that soldiers do still occasionally find themselves caught in the midst of reloading their weapons in close combat- the very situation bayonets were invented to cope with over 300 years ago. Soldiers without a bayonet are at a grave disadvantage in the narrow subset of situations where a bayonet is actually useful.
This problem is not likely to go away. While high-tech armies such as the US military may be moving away from man-to-man close fighting, their enemies have good reasons to move towards it. Low-tech forces have no chance of defeating a modern army unless they can overcome its overwhelming advantage in stand-off firepower. The easiest way to do this is to engage in extremely close combat, so close that the enemy cannot safely use stand-off bombardment. The very fact that the US military and other, similarly equipped forces are so good at bombarding an enemy in the open field forces those enemies to go to ground in cities and to rely on close-range ambush tactics, creating situations where a bayonet can occasionally be both effective and necessary.