viewing microcontroller's output
Most likely the ground is already connected to the PC by other means.  This could be a power supply with a ground lug that connects ground to it, via USB, RS-232, thru a scope, etc.  It's pretty easy to end up with ground not floating unless you are careful to ensure it is floating.

However, relying on some other ground connection path is not a good idea for a signal.  If you listened to the audio, you will probably hear some background noise when the ground is not connected thru the audio cable.  There will probably be even less noise if you eliminate the other ground path so that the PIC circuit is only grounded to the PC thru the audio cable.  With both ground connections, you have a "ground loop", which has a good chance of adding noise to your signal as seen at the PC input.