Event propagation

That’s because you only have one div in the form. If you had 20 divs in the form then it makes more sense to attach the code to handle processing the divs to the form tag instead of 20 times to each div separately. That way you can handle all the processing from the one event listener instead of having to keep replicating it.

The processing for the form itself can be attached to the form element as well using a separate event listener listening for the same event.