The refX attribute is used alongside the refY attribute to provides coordinates for the location on the marker where it will be joined to its markable element. Coordinates are relative to the marker's coordinate system, and not the markable element it is placed on.
An example use-case for using refX and refY coords might be placing the center of the flat bottom of a triangle marker at the end of a line: