Switching wiring from one transformer to another
The other transformer is for some other system - another doorbell, an alarm system or (small possibility) HVAC. So even if you can move the wires and power the NEST with that transformer, it is possible that (a) the combined loads of the two systems may be too much for the transformer, as it is rated at exactly the value recommended for the NEST by itself, and (b) there could be some unexpected interaction between the two systems - i.e., one switching on/off might somehow induce a problem into the other one.

Transformers are cheap. A quick search finds them at around $10 on Amazon, and you may be able to get one in a regular store (which has overhead but doesn't have to build in the Free Shipping to every little product) for less. Just make sure it is UL Listed as one side of the transformer is connecting to 120V AC.