Pull it off

I've been searching for the meaning of "Pull it off". As in, the team was 10 points behind but they pulled it off in the last inning. When searching I find many references to it being used but none with an explanation of how it came to be. I completely understand the meaning of it, but wonder how it came to be.

Thanks in advance for your help on this one

The only help I can give you is that the expression, with the meaning you impute to it, has been used in that way since the last half of the 19th century. There is a newer phrase with a similar meaning, "pull it out," which also defies explanation. (Both phrases also have literal meanings, which is not the point here.)
SS