In response to how listening from under a layer is a one way advantage.
The physics term is refraction. Not all sound travels in direct path. Add to that the FOM advantage of much LOWER ambient noise (self noise) and your detection calculus comes up FOR the sub most every time compared to any surface ship.
Air based detection is another matter.
Other physical terms include scattering ... any ASW primer should see you through the rest.
Depending upon a number of physical conditions, there can be surface ducts even in relatively shallow water, but sound propagation paths can change quite a bit between day and night due to a few degrees change in temp here and there in the mixing layer.