The main reason to remove an event listener is when you no longer want to be notified of that event, even if it occurs again in the future. This is not the most common behavior and you generally do NOT need to remove event handlers after they fire. For example, removing a button click event handler after it fires would render the button inoperable going forward.
There are examples of a situation where you might want to remove an event handler. A most common one might be that you're registering an event handler for the end of a specific CSS animation sequence. The code that is running now wants to know when the current animation is done, but there may be other animations running later in the program on this element and this code does not want to know about them. So, you install the event handler now when you kick off the animation and then when it fires, you remove the event listener.
FYI, jQuery offers the .one()
version of .on()
which will automatically remove the event handler after it fires. I use that extremely rarely. Generally I want an event handler (particularly click or key event handlers) installed for the duration of the lifetime of the page.