Because it's calling itself with the potential scrollable parent to make sure the entire scroll area isn't outside the body scroll area (in which case it's irrelevant).