Let's take biology as an example:
Let's say, in the beginning of the year you aimed for a B at A-levels on whole.
After AS you got 150/300 UMS. Which is a D.
So to secure a B you need 420 out of 600 UMS, which means you have to get 270/300 for A2.
Let's just say, I found AS to be much more manageable to get a higher grade in, that from A2. So with a D at AS, hoping for 270 at A2 is impossible.
Since AS is easier to score in, it's advisable that you repeat and get the highest grade and highest mark possible, based on what you are aiming at. Because recovering at A2 is a LOT harder and not advised.