I thought I remember something from Chinese and it seems indeed that 七転び八起き originally comes from the Chinese saying 七顛八起{しちてんはっき}.
Now, regarding why the numbers 7 and 8 there are a couple of things to clarify:
- Why is the "getting up" number higher? One could argue that you fall
seven times.. you will rise seven.
- Why specifically 7 and 8?
Regarding point number 1:
Here you can find the following argument: when we were born we could not stand up. Hence you actually start counting from the first time you rise up, with the consequence you have to add +1 to the number of "rising up". I think this is an interesting point of view, and it kinda makes sense. The original quote below:
七転八起(しちてんはっき七顛八起とも書きます)の七と八ですが、どうして、同数ではなく七と八なのでしょうか。
さて、人間は、生まれた時にはまだ立っていません。そのため、まず立つところから始めると考えると起き上がりは、プラス1回です。「七転び八起き」となります。
Regarding point number 2., there are a few explanations. One is in the same link above:
七の由来は、線を切ることを表した文字からきたそうです。横棒を縦棒で切ることを表してあるようです。
七転び八起き。何度も転んだことを断ち切り、新たな一歩を踏み出すという意味合いの言葉のようです。
数の七には、「千(多い)」という意味があり、八は末広がりで「幸福」という意味があります。
ここから「七転び八起き」という言葉ができたという説もあります。
So basically 7 was chosen because it represents a horizontal line cutting a vertical line embracing the meaning of "cutting away" the many times you have fallen and starting out a with a fresh new step.
Another thing is:
数の七には、「千(多い)」という意味があり、八は末広がりで「幸福」という意味があります。
That is, the number 7 bears the meaning of 千(多い) (many) while 8 has the meaning of "spreading out like an open fan" (happiness, blessedness).
This other link provides other insights:
語源についてはいくつか説があるようで、一つが「七転八倒」と同じく単に「七も八もたくさんを意味する」程度であるということ(世に生れ出る時に「立つ=起きる」から、倒れる数より起きる数の方が一回分多い、あるいは七回転んで八回目にようやく立ち上がった)、一つが「一転び二起き、三転び四起き、五転び六起き、七転び八起き」と続きの言い回しの中の一部分であるという説、そしてさらには聖書の言葉「正しき者は七回倒れても再び起き上がる(For
a righteous man may fall seven times, and rise
again)」(Proverbs24:16)(and rise againの部分はbut he gets up
againのこともあり)に由来する、とする説もある。どれが真相かは分からない。まさに「神のみぞ知る」というところか。
I think it is interesting here the parallel with the biblical interpretation, although I wonder how much influence that might really have depending on how old this saying is.