Moving a doorbell transformer
The door bell transformer is mounted to a mains electrical box. Electrical code requires that all electrical boxes remain accessible. You cannot bury or hide an electrical box. 

This translates to the fact that you cannot cover the electrical box + transformer behind drywall.