On the Theories Behind Hard Negative Sampling for Recommendation