It reflects the evolutionary history of locomotion. Our wormy ancestors slithered on the sea floor, so undulated side-to-side. Fish inherited that movement, for which a vertical tail is best.
Their distant land mammal descendants evolved to run with limbs underneath: an unstable gait allowing rapid direction changes. To extend the stride, their spine flexes up-and-down. Marine mammals kept this movement, for which a horizontal tail is best.
A tidal creek normally floods because the water arrives from upstream at a faster rate than it can drain away into the sea. As the water level rises, the drainage rate will inevitably increase to some degree, but it must always be less than the upstream flow – or the creek wouldn’t flood.