Why is there a resistor between the primary and the secondary winding?
This resistor provides a leakage path for any charge that builds up on the secondary side. 

If this leakage path was not provided then the secondary could potentially float (with respect to primary) to a large potential