But a lens that's been properly designed and manufactured should be perfect at all distances out of the box. The only thing that might need sorting is a miscalibration between the lens and camera, but when that's fixed with in-camera AF fine-tune, that single global adjustment should put everything right. And pretty much, it does, though I accept than in the real world there may still be small errors at the extreme ends of the focal length and distance range.
On the other hand, tweaking AF can be tricky and a lot of people end up doing it wrong and making things worse. Nikon's new automated system looks very promising on that score.
Edit: Nikon's new automated AF fine-tune feature
https://www.dpreview.com/news/3468248279/nikons-automated-af-fine-tune-explained