An element removed from a list cannot be pointing to other elements in the list after its removal.
Consider the list
A -> B -> C -> D . And you remove the element
B from the above list. Without the statement
e.next = nil
in the code snipped above, the memory layout will look like this.
A -> C > D ^ | B
Now if the element B is still in use(say element B is used till the end of the progarm), It has a pointer to C. This means that C cannot be garbage collected even if C is removed from list later and is not required for anymore.
A similar case can occur for