There’s differences with all three of those movements. And depending on how each is performed, differences between the movements themselves and what they are biasing.
With barbell squats, I can make it a more glute dominant movement as opposed to a more quad dominant movement based on how I’m performing it.
With hacks, I’ve got more bracing due to the pad which eliminates the hips. This means for people with poor ankle and/or hip flexibility it can be a better option than barbell squats, and it tends to bias the quads more. This also makes it a better quad movement than the barbell squat for those with longer femurs.
The leg press takes away the axial loading all together and can allow the lifter to make it a more glute/hamstring dominant movement depending on foot placement, or a more quad biased movement for the same reason.
So they all can do different things, and even depending on how you’re performing them the same “lift” can be doing different things, i.e. stressing one muscle area more than another.