What is event delegation, and why is it useful?
Event delegation means putting a single listener on a shared ancestor instead of putting one listener on every element that you care about. The browser does the work for you. The event bubbles up from the element that was actually clicked to the ancestor, and the ancestor's handler runs.
There are two reasons that it is worth the extra step. The first one is performance. If a list can have a thousand rows, then one listener on the container is a thousand times cheaper to register than a thousand listeners on the rows, and it stays that way as the list grows. The second reason is that it survives changes to the markup. Rows that you add later work automatically, and rows that you remove take their listeners with them, so you never end up with stale handlers pointing at elements that no longer exist.
That second point is the bigger win in real work. The alternative, which is attaching a listener to every row and removing it when the row is removed, is where memory leaks come from in single page applications.
The cost is that the handler has to work out which element the user really interacted with. The event object gives you the target, which is the deepest element that the event happened on, so clicking the text inside a button reports the text node's parent rather than the button itself. The standard technique is to use the closest method with a selector, because that method walks up from the target to the first ancestor that matches, and then to check that the match is inside the container that you delegated from.