What is this rubber thing on my gear cable and what does it do?
There are three rubber rings, also known as "cable donuts" in your picture. With a little effort you can separate them and space them out along the cable. As gschenk says, they are supposed to prevent rubbing or slapping damage to paint or decals and prevent cable slapping noise.
They get mixed reviews.