The reason for this is that lenses are built to tolerances (just like any engineered item). Measurements of the glass thickness or distances between glass elements will be made to a tolerance of perhaps + or - 3%. Meaning that the distance between the rear element and the sensor in your camera could be a fraction out, resulting in slightly less sharp images.
If you don't have micro adjustments on your camera, you just have to swap lenses till you get one that looks sharp with your camera.
My friend once went through 3 or 4 different copies of the same lens before finding one that gave sharp images on his camera.