Check the orange rope. It starts at a bollard on the left ship, goes through a ring on land and then is tied to a bollard on the boat to the right.
The rope is not fixed in the ring, just goes through. Now imagine if the left boat moves downstream (due to passing traffic) then it pulls on the rope which in turn will pull on the ship on the right causing it to move upstream .... and at some point the two will touch bow with bow.
This is called rope-sharing.