I think that the "turn to standby" when changing code is likely to have been dreamed up instructors sitting about on bad weather days who seem to like to try to turn flying into a black art.
Indeed, as aviation mythology is debunked on PPrune, we do need to keep dreaming up new stuff to retain our status as "we know everything-it's got to be my way sky-gods" to our students.
On the other hand, maybe some of us try to improve our knowledge and be as well-informed as we can be. Have a look at the top of column two, of page two, of this Eurocontrol publication,
http://www.skybrary.aero/bookshelf/books/714.pdf
which admittedly is from March 2009 and you'll see;
To avoid transmitting an emergency code while changing selections, always switch temporarily to SBY until the new code has been set in the display.
This does only seem to apply to older, traditional type transponders, rather than the more modern, digital, push-button models. Pretty sure this wasn't written by any instructors though.