Why do we need to set IDs to the parent and child elements when removing a nested element?

To be able to access them in the scriptTo make them displayWe don't need to set IDs

To be able to access them in the script.