In that situation, it is better to turn in the direction the approaching vessel.
If the boat had turned to port, the stern of the boat would have entered the path of the vessel. By turning to starboard both the bow and stern are out of the oncoming vessels path.
If the boat had turned to port, the stern of the boat would have entered the path of the vessel. By turning to starboard both the bow and stern are out of the oncoming vessels path.