It avoids a full sort which is not so cheap. I think statsmodels is likely using it in a loop.
However, statsmodels now requires a numpy version that has percentile and we are slowly switching to it.