You don’t wear a cup for basketball or track so some sports require and others don’t. Baseball, football, hockey require by regulation in school sports while basketball and cross country, etc of course do not.
It used to be common for a coach to hit you in the groin area to ensure you were wearing a cup in sports where required.