This is because the further into the future we forecast, the more uncertain the estimates become. The sooner a project pays for itself, the more confident we can be that it will actually do so, as we are more certain of the early cash flows being achieved.
It minimises risk associated with the project not paying for itself, as the estimates for the earlier years are more reliable. Therefore, a shorter payback period reduces the uncertainty and risk of the project.