Why do waves on the sea shore move towards the shore even when the tide is going out?
Waves are generated by wind. But aside of small local winds, most of the waves you see at the shore are generated by stronger winds far out on the sea from where they start to propagate into all kinds of directions.
Imagine a point in the middle of the sea where a waves with different directions are created. They will propagate away from this point until they hit a shore, therefore they can only move towards the shore not away from it.
This is also why waves always brake towards the shore and not away from it. Waves in deep water are more or less circular waves which will go unhindered until the ground is too shallow for the circular motion to go on. See here: