Almost every cable on my PC has one of these thingies on it, near one end.
Sometimes square and sometimes round (cross section), but all about the same length.
Some are easily removable, which is nice because they make threading cables a pain in the butt. Of course I alway put them back on, just because.
Most seem to have a metal core but some are all plastic, I've even seen at least one that was plastic trusses inside.
So inquiring minds want to know...what are they and what are they for?
I suspect they stop static electricity or maybe even voltage surges, but I don't know.