could you help me understand this snippet? I don't understand why this function have to check the collection contains the element before remove it. Since the iterator is from the collection, all element returned by iterator is definitely in collection.So I think it's a waste of time. Thank you a lot

```
   public boolean removeAll(Collection<?> c) {
    Objects.requireNonNull(c);
    boolean modified = false;
    Iterator<?> it = iterator();
    while (it.hasNext()) {
        if (c.contains(it.next())) {//I don't understand
            it.remove();
            modified = true;
        }
    }
    return modified;
}

```