It’s a noise filter. On older cars, there were called condensers and usually a metal cylinder with a metal tab and a single wire.
The question is where does it plug in. It could be an extra part dropped by the assembler and he just grabbed a second and installed it.
I don’t think you need to worry about it.