Scientists are and have been able to predict astronomical events far before when they actually occur with nearly 100% certainty. We know when an eclipse will happen years ahead of time, but as for the duration of a total eclipse, we can’t predict it with much certainty.
The reason that astronomical events like eclipses are so easy to predict with so much certainty is that objects in space are massive and have very predictable forces acting on them. On earth, there are many different chaotic forces at play at any given moment that makes it very difficult to predict daily things like the weather. In space, however, though those forces still do exist, they are much less significant to the path of a massive object such as the sun or our moon. For this reason, we can usually predict large scale astronomical events long before they happen, but that isn’t always the case.
The length of time that the sun will be covered by the moon is significantly harder to predict than when the eclipse will start. The reason for this is that, because the chaotic forces on the surface of the sun are so unpredictable, the size of the sun at any given moment is incredibly difficult to predict.
Because the path of totality, where the moon will appear to completely cover the sun during the eclipse, is directly proportional to the size of the moon and the sun, changes in the size of the sun will change how large the path of totality is which, in turn, changes the length of time that the total eclipse will be visible for.
The variation in the size of the sun can affect the length of the eclipse by minutes and, given that the average length of an eclipse is 3 to 4 minutes, can be a pretty pronounced difference.