I think it's left over from pre-generic days. Both the add
and remove
methods used to take an Object
argument. When generics were introduced, there was good reason to change the add
method, but there really wasn't any good reason to change the remove
method (because the reason you cited allowed it to remain as is).
My guess is that if it were designed from scratch today, Collection.remove
would take a generic argument, not an anonymous Object.