In GamePress's article about Catch Mechanics, they describe how the capture chance is calculated for each ball thrown. At the end of the article they say this...
Catch Success and Failure
Finally, the server generates a Random Number between 0% and 100.0%. If Final Capture Chance is greater than this random number, the Pokémon is caught. If Final Capture Rate is less than this random number, the Pokémon breaks out and possibly flees.
How the capture rate is calculated is explained well in article, however, what I don't understand is when the Random Number is chosen. Is a value chosen with each throw, each encounter, each spawn?
So basically, I can modify the Final Capture Chance by giving a Razz Berry, throwing a different type of ball, and/or throwing the ball when the target circle is smaller/larger. But if the Random Number is 100%, and it never changes for that Pokémon. Then I don't have much chance of ever catching the Pokémon. However, if the Random Number changes with every throw, then I always have a chance to catch it with the next ball (assuming it doesn't run away).