Ada was clearly incredibly intelligent. I can't source the original texts for Babbage's program, but it does seem that he was aware of loops, and might have implemented them:
"In the absence of other evi-
dence I have had to adopt the minimal default assumption that both the operation and variable cards can only be turned back-
ward as is necessary to implement the loops used in Babbage’s sample programs cited in Ada Lovelace’s notes (originals in L series notations)"
"In the absence of other evi- dence I have had to adopt the minimal default assumption that both the operation and variable cards can only be turned back- ward as is necessary to implement the loops used in Babbage’s sample programs cited in Ada Lovelace’s notes (originals in L series notations)"
https://ieeexplore.ieee.org/document/887986