Pure luck basically.
Coaxial cable is not just about the shield. It has controlled impedance characteristics, as does the antenna, connectors, and even the PCB traces. Impedance mismatches cause signal reflections (SWR) along the way which can reduce the amount of signal that actually gets to a receiver, and if the antenna is used for transmission, can also potentially damage the transmitter.
In this case since the phone was still working with it completely disconnected, most likely it is a receive diversity antenna.
I bet with your "fix" what is actually happening is the wire itself is kind of acting as an antenna, you just got lucky that this ended up improving rather than impeding performance.