As the contact is being broken, a connection is made through very small pieces of metal (microscopic features), which have enough current through them to vaporize, the ions of which then support a current through the air briefly.
While lower voltages do not, in general, jump a gap that is present
before the voltage is applied, interrupting an existing current flow
with a gap often produces a low-voltage spark or arc. As the contacts
are separated, a few small points of contact become the last to
separate. The current becomes constricted to these small hot spots,
causing them to become incandescent, so that they emit electrons
(through thermionic emission). Even a small 9 V battery can spark
noticeably by this mechanism in a darkened room. The ionized air and
metal vapour (from the contacts) form plasma, which temporarily
bridges the widening gap.
Also, when a flowing current is interrupted, it will cause inductive kickback, where the collapsing magnetic field causes an increase in voltage, to try to maintain the existing current. The voltage can increase enough to cause dielectric breakdown of air and allow current to flow through it.
Attempting to open an inductive circuit often forms an arc, since the inductance provides a high-voltage pulse whenever the current is interrupted
Wikipedia: High voltage § Sparks in air
I'm not sure if inductive kickback is strong enough with a 9 V battery to cause a spark by itself, but it would help current to flow after the plasma path has formed.