Why is it installed here

I have only seen this one time before. it’s on the A/C compressor breaker.

My wild guess would be to serve as a capacitor for power surge.

That is my thought also , but why at the breaker? and not at the unit

Is there 2 units?
Good question but my first thought is something is different that would cause imbalance which can not be addressed at the appliance for some reason.
Just theorizing.

I would write it up as jury rigged and pass to the HVAC guy.

Hey I got a guy…met him Thursday night…lol.

1-unit, and i am going to send him the photo

Great ,let us know what he said.

It looks like a Metal Oxide Varistor (MOV). The idea is to use it as a Voltage clamp.

And a voltage clamp will ???

Shunt harmful voltage spikes and keep them out of load side connected equipment.

Meaning against power surges as we both already suspect.
Is that not already built into equipment?

Looks just as bad as a regular double tap with the added fun of not being sure 100% what it is as and more bare wire to grab at in the panel.

It’s a capacitor, not a MOV. My first guess would be a homebrew phase coupler to pass carrier-current control (X10 or the like) from one phase to the other. It should be removed and replaced with a manufactured device as this has exposed leads and is improperly protected at 40A.

If it is one, it has nothing to do with the AC except that was a “convenient” place to connect it to.