As far as I know, this is not a bug, but an actual function of the iPod portion of the phone. If you are playing music on the iPod portion with the headphones, and disconnect them, the music should automatically pause. It may be that you didn't finish listening to a portion of a song, or paused it there, and once you disconnected, it disabled the pause. From what I can tell, and I haven't tested it completely, the removal of the headphones will either pause or play depending on what condition the iPod was in. I recall it doing that way in my 1st Gen phone too, just that it paused music if I unplugged the headphones.
You might want to check the iPhone manual.
Message was edited by: ChrisJ4203