Why is the Mahalanobis Distance Effective for Anomaly Detection?