When you disconnect the XBee shield and connect it to the USB explorer, you power cycle the XBee. When you power cycle the XBee everything reverts to what is stored in NVRam. If you want to make the values permanent, use the WR command. However, the NVRam on the XBee can only handle a limited number of writes. So be sure you want to write the data before you do so. Usually, you only do a write once during initial provisioning.