Rationale for switching to nonlocal functionals in density functional theory