Animation Events call public functions from the scripts assigned to the game object playing the animation. To make it work, the Function field of the Animation Event needs to have the same name as the function we want to call from the script.
Events are extremely useful because they allow us to synchronize function calls with animations. The best moment to check if player hits the target is when we see a visual hit in the animation—a fist is in its extreme position in a punch, or a sword is in its extreme position in a swing. Without Animation Events, we would have to always manually delay function calls to achieve similar results.