You were watching the same frequencies, but they're numbered differently depending on whether you're in "cable" or "air" mode.
See
http://en.wikipedia.org/wiki/North_American_cable_television_frequencies (scroll to "
North America cable television frequencies")
and
http://en.wikipedia.org/wiki/North_American_broadcast_television_frequencies (scroll to "
VHF Bands" and "
UHF Bands")
===
Imagine, for example, that Food Network was on channel 75 on cable. The first link shows that the Video Carrier for channel 75 is 529.25MHz.
Now, look at the other link. Note that the Video Carrier for channel 24 is 531.25Mhz. That's not the same as the carrier for cable, but it's close enough -- select channel 24 in "air" mode and your TV will automatically fine-tune itself to the Food Network signal.
If you compare the two charts you'll find plenty of other frequencies that map to one channel on cable & a different channel on "air".
It worked the other way around too: if WCGV-TV was broadcasting over the air on channel 24, and you connected an antenna to your TV and selected "cable" mode & tuned channel 75, you'd see WCGV.
Note also, that for channels below 14, the Video Carrier frequencies
are the same in both tables. That's why 2 through 13 had the same stations either way.
===
For the most part this won't work anymore. The modulation method used for over-the-air analog TV was the same as that used for analog cable, but the modulation methods for digital TV are different.