In your case one of two things is probably happening:
- The lens in question is an older design that does not include a position sensor to report back to the camera how far the focus elements actually moved when the camera has sent an instruction to move a specified amount.
- The lens does have such a focus position sensor, but it is in need of calibration.
In either case, AF Fine Tune (Nikon) or AF MicroAdjustment (Canon) can help the problem if the camera in question has AFFT/AFMA capability. AFFT/AFMA will more effectively correct the second case than the first case listed above. If the first case applies, then the first issue identified in HamishKL's answer can still create difficulties if the lens also has that problem.
A more complete explanation and background for the above answer
Your question appears to make an incorrect assumption about the way Phase Detection Auto Focus (PDAF) works in most cameras. It seems you believe the PDAF system in DSLRs use the optical AF sensor to confirm AF has been achieved before taking a picture. This is not the case. The vast majority of PDAF systems do not take a second optical reading using the PDAF sensor in the camera to confirm AF has been achieved before allowing the mirror to begin swinging up out of the way so that a photo may be taken.
The answer by @HarnishKL correctly identifies ways that a lens may still be soft when it is focused as well as it can be, but it misses the most likely reason for why a lens will consistently miss focus in the same direction: because the lens isn't moving the same amount as the camera has instructed it to move.
When PDAF systems were first developed back in the film days, the emphasis was placed on speed. To be attractive enough to buyers considering upgrading from their manually focused cameras and lenses the new AF systems needed to minimally be at least as fast as a moderately skilled user could focus and also at least as accurate as that user could focus. If the AF system could be either faster while being just as accurate or more accurate while just as fast, it made the cameras with AF more attractive. To do both noticeably better was a little outside the technological capabilities at the time. The computing power of chips small enough to fit in an SLR then was a lot less than the computing power of today's chips.
In the late film era when PDAF systems were born a very low percentage of photos were ever printed or viewed at more than about an 8x10 display size. The vast majority of them were viewed at 4x6 inches. The standard for good enough in terms of focus accuracy was a lot lower then than it is now in the current 36MP, 100% pixel-peeping, 96ppi large HD monitor era. So the emphasis back then was placed on focusing speed.
Because the prime consideration for PDAF systems was speed, until fairly recently most PDAF systems were what can be described as open loop. The camera used the optical PDAF sensor to measure how far and in what direction the lens was out of focus, the camera sent instructions to the lens regarding how far in which direction to move focus, and then the camera took the picture. The camera did not use time taking a second reading via the AF sensor to confirm focus had actually been achieved. It would have taken too long to make PDAF systems usable.
Even more recently, cameras that do attempt some type of confirmation usually use a position sensor on the lens to confirm it actually moved the instructed amount. They still don't normally take another focus reading using the AF sensor. It would still take too long for many applications.
Here's why: In order to make AF and frame rates as fast as possible, as soon as the AF sensor has measured focus and computed the time it expects the lens to take to move the instructed amount, if the shutter button is pressed all of the way down the mirror begins to move out of the way. Once the mirror is moving the PDAF optical system is disabled. But a position sensor in the lens that measures how far the focus has been moved can measure and confirm a specific amount of movement and communicate it to the camera during the time the mirror is swinging up. If any additional movement is needed the camera can send another instruction to the lens to move the amount, as reported by the position sensor in the lens, that is still needed. It can only confirm this movement via the sensor in the lens, though, because the PDAF optical sensor is blind at this point!
As Roger Cicala of lensrentals.com discovered and pointed out in part 3B of his "Autofocus Reality" series for his blog, it takes both a camera and a lens with this position confirmation capability to get the increased accuracy of the more refined system. If the lens has the position sensor but the camera doesn't pay any attention to it, it does no good. If the camera has the capability but the lens has no position sensor, it does no good. It takes both a lens with a position sensor and a camera that utilizes the information it provides to get any of the benefit. But even then, if the position sensor is a little off when it measures the position of the lens' focusing elements, the camera's AF system need to be instructed to correctly offset the inaccuracy.
With the new Sigma Global Lens series of lenses, an optional USB dock can be used to actually calibrate the lens to correct for incorrect focus element positions, rather than have the camera compensate for the expected error.