When a hosted feature service is queried with the 'Return Centroid = true' option, the centroid is returned if there is no output spatial reference set. If the Output Spatial Reference is specified, the centroid is not returned with the features in the query results.