It was not intended as a cosmetic ban, but a way to ban most semi auto rifles with any military heritage.
A bayonet lug has long been a standard of military designs, a requirement, and often built to a standard of being able to withstand significant amounts of force (one that just "held" a bayonet would not be adopted, it needs to be strong enough to actually allow use of the bayonet.)
Therefore the antis intent was to prohibit all semi-auto rifles based on military designs.
Since a bayonet was standard on such designs, banning bayonet lugs was a way to do this.
Since your average civilian never actually uses a bayonet anyways, most would hardly notice if the lug was there or not.
The gun manufacturers are the ones that turned it into a "cosmetic" thing, but just making guns that were no longer based on the military designs, and got around the restrictions by simply removing some of them and replacing them with something not named where necessary.
Since the bayonet was not needed at all, they simply removed the bayonet lug completely, and made the rifles no longer able to attach a bayonet.
The antis didn't car about bayonets, but they did car about military rifle designs, most of which had the means to attach a bayonet.
A bayonet though is not really "cosmetic". It is a functional component of a firearm. It is just "cosmetic to a civilian that would shoot the rifle long before they put themselves in a situation where poking with a bayonet was needed.
But a bayonet lug is typically so overbuilt to allow thrusts with a bayonet that it was often the strongest and most robust attachment point of any design based on a military firearm.
You could design many things to attach to such a strong point. The removal of the strongest attachment point of many rifles simply to comply with such restrictions was not "cosmetic" in reality, just "cosmetic" in the result, rifles that shot the same but no longer had the attachment point.
The "assault weapon" bans of various states also grow, and grow, encompassing new firearms all the time.
Many people think they know what an "assault weapon" is, but they are sadly mistaken.
That is one of the ways the antis win, people think they know the firearms targeted, and are then divided and conquered.
Once they defeat the group split from the herd, they split a new group from the herd.
California has added even single shot .50 BMG firearms to the list of "assault weapon" restrictions.
A pistol with a threaded barrel is an "assault weapon".
1911 with threaded barrel? Assault weapon.
Even a firearm that would look at home in an old Western is an "assault weapon" with an 11 round tubular magazine.
Some places (like Chicago) have since declared things specifically exempt from the federal version like the mini-14 "assault weapons" as did various attempts to "re-instate" the expired federal one.
Several of the attempted "renewal" or "reinstatement" bills at the federal level have included just a single line that said something about giving the Attorney General the power to name anything an "assault weapon".
This power in practice would extend to the regulatory agency when the AG gave them the authority to act on his behalf.
That means the ATF could have named absolutely any firearm an "assault weapon" at will.
Other bills have included a line that made the assumption that any firearm adopted by the military or a federal LEO agency was an "assault weapon" unless they said otherwise.
This effectively means all they would have to do to ban any gun is adopt it briefly in any LEO agency, for even small side roles.
You don't know what an "assault weapon" is, and neither do I. We never will because the definition is determined by the latest active legislation that defines it (which is currently none at the federal level.)
It is an amorphous term, that takes on a new shape each time the antis wish, or existing legislation is amended by some rider on your typical standard budget, and just a couple words or a single sentence alter the whole way it is applied.