Many TVs are programmed to respond to additional codes other than the ones covered by the buttons on the original remote. These codes often include discrete power codes and input selects, but in addition to that they also include codes that get you into the service menu and, on occassion, codes that will completely reset your TV (somewhat like the code you stumbled across).
What evidently happened is this, your TV must be programmed to respond to the code that was programmed on the SWAP button as part of TV/0761, so when you pressed it, that's what you got. I assume for some other model of TV this code really is the PIP-SWAP command, but not yours.
The fault here lies squarely with Advent for using a code which is a valid code for some other model to work such a destructive function.
I just looked up the TV/0761 setup code, uses the NECx1 protocol with a device code of 8, but there isn't anything assigned to the SWAP button, so are you sure this is the code you had programmed to the TV device button?
I'm assuming your remote is the One For All URC-9960 rather than the Radio Shack 15-2138? If so, can you check if it's the B01 version.