This was answered by The Mathworks so I thought I'd pass this along:
A “PickableParts” property was added to the “text” function in MATLAB R2015a. This property now has the ability to capture mouse clicks, while 'HitTest' handles the response to a click. In order to avoid capturing the mouse click on the text, set the “PickableParts” property of “text” to 'none' so that the click passes to the object (polygon).
Refer to the following code snippet with the required edit. Please note the added property “PickableParts” in the “text” function.
%%%%Code snippet start %%%%
I = imread('pout.tif');
hImage = imshow(I);
hImpoly = impoly;
a_iImpolyXY = getPosition(hImpoly);
a_fCentroid = mean(a_iImpolyXY);
hText = text(a_fCentroid(1), a_fCentroid(2), 'DOH', 'color', 'red', 'fontsize', 24, ...
'fontweight', 'bold', 'parent', gca, 'hittest', 'off', 'PickableParts', 'none');
%%%%Code snippet end %%%%