Overhead squats are one of those movements in CrossFit that I consider to be a special strength exercise. I consider it to be this because it is not necessarily a good exercise for improving any specific quality you are typically trying to improve by lifting heavy loads.
Yes it can get your legs stronger because it is a squat, but there are much better ways to do it like back squatting because overhead stability is not a limiting factor.
Yes it can also improve you shoulder strength and overhead stability, but the mobility requirements and dynamic nature of the movement make it much less efficient than some sort of other pressing movement that you can most likely load heavier.
This is why I consider it a special strength exercise, it is required to be successful in CrossFit competitively, but is not the best way to attack any particular adaptation