Why should we re-attach the event listeners from an old script instance when it can swap?

Today I am learning how to use hot-swapping. I was puzzled when I read the following passage:

It is also important to remove any event listeners from the old instance and re-attach them to the new one.

I tried to comment out this code to run the program, and I manually turned on and off the script during the running of the program, without any errors, the ‘onEnable’ event can still be executed normally, so what is the point of re-attaching the event listeners??

// remove the old event listener
old.off('enable', this._onEnable);
// add a new event listener
this.on('enable', this._onEnable);

Hot swapping is different from disabling/enabling a script.

With hot swapping, the engine is creating a new instance of the script hence the need to off/on the event. Here, we are removing the listeners on the old script instance adding new ones to the new script instance.

With enabling/disabling a script instance, it is still the same instance attached to the entity.