Adjust sub-pixel coordinates in RefineChessboardCorners

Hi, in the source code for selectAndRefineChessboardCorners I don’t understand line 161 and 170 here: opencv/modules/objdetect/src/aruco/charuco_detector.cpp at 5.x · opencv/opencv · GitHub

Before cornerSubPix (0.5, 0.5) is subtracted from the corner, and afterwards (0.5, 0.5) is added back. The line is commented “// adjust sub-pixel coordinates for cornerSubPix”
Can anyone explain this comment and why the pixel shift is necessary?