Most animal experts agree that play, in general, is a great mechanism for trust building.
Regardless of the root of the instinct, behaviors like this tend to mimic what is seen in nature and playing tug of war is no exception.
This behavior mimics specific movements dogs used in the distant past to aid with hunting.