I too found it difficult to understand.
The reason the device is not recognized when you remove external power is that the conditions for bus powered USB are not being met. The cause of this can be plenty.
Here is what the USB spec says:
18.104.22.168 Powered USB devices may obtain power from an external source and/or from the USB through the hub to which they are attached.
Externally powered USB devices are termed self-powered. Although
self-powered devices may already be powered before they are attached
to the USB, they are not considered to be in the Powered state until
they are attached to the USB and VBUS is applied to the device. A
device may support both self-powered and bus-powered configurations.
Some device configurations support either power source. Other device
configurations may be available only if the device is selfpowered.
Devices report their power source capability through the configuration
descriptor. The current power source is reported as part of a device’s
status. Devices may change their power source at any time, e.g., from
self- to bus-powered. If a configuration is capable of supporting both
power modes, the power maximum reported for that configuration is the
maximum the device will draw from VBUS in either mode. The device must
observe this maximum, regardless of its mode. If a configuration
supports only one power mode and the power source of the device
changes, the device will lose its current configuration and address
and return to the Powered state. If a device is self-powered and its
current configuration requires more than 100 mA, then if the device
switches to being bus-powered, it must return to the Address state.
Self-powered hubs that use VBUS to power the Hub Controller are
allowed to remain in the Configured state if local power is lost.
Refer to Section 11.13 for details.
Most likely the problem is with the hardware configuration on your PIC.
I suggest you look for disrepencies of your pic hardware with suggested USB schematic. Focusing on VBUS will help.