If attribute scope is specified, the scoped variable is removed according to the semantics of PageContext.removeAttribute(varName, scope). Otherwise, the scoped variable is removed according to the semantics of PageContext.removeAttribute(varName).
And if you look at PageContext.removeAttribute(varName) : Remove the object reference associated with the given name from all scopes. Does nothing if there is no such object.
So if you don't specify the scope, and the value is null, then the variable will be removed from all scopes.