When you pick a background colour, the forum code for that pet is changed to use that background colour - but it doesn't permanently change the background of that pet in your pet groups, and once you leave or refresh the page the background will reset to transparent.
If you want to put your pet in your signature, trade rules, etc. to show the background colour you have chosen, copy the "Forum code" at the bottom of your pet's page. It will show up like this: