A person could be beaten with not more than 40 lashes, and it came to be 40 stripes minus 1 (=39).
Deu 25:2 And it shall be, if the wicked man be worthy to be beaten, that the judge shall cause him to lie down, and to be beaten before his face, according to his fault, by a certain number. Deu 25:3 Forty stripes he may give him, and not exceed: lest, if he should exceed, and beat him above these with many stripes, then thy brother should seem vile unto thee.
2Co 11:24 Of the Jews five times received I forty stripes save one.
The law (OT) is our tutor to bring us to Christ.
Gal 3:24 Wherefore the law was our schoolmaster to bring us unto Christ, that we might be justified by faith.
One way we learn is by chastisement
Heb 12:5 And ye have forgotten the exhortation which speaketh unto you as unto children, My son, despise not thou the chastening of the Lord, nor faint when thou art rebuked of him: Heb 12:6 For whom the Lord loveth he chasteneth, and scourgeth every son whom he receiveth. Heb 12:7 If ye endure chastening, God dealeth with you as with sons; for what son is he whom the father chasteneth not? Heb 12:8 But if ye be without chastisement, whereof all are partakers, then are ye bastards, and not sons. Heb 12:9 Furthermore we have had fathers of our flesh which corrected us, and we gave them reverence: shall we not much rather be in subjection unto the Father of spirits, and live? Heb 12:10 For they verily for a few days chastened us after their own pleasure; but he for our profit, that we might be partakers of his holiness. Heb 12:11 Now no chastening for the present seemeth to be joyous, but grievous: nevertheless afterward it yieldeth the peaceable fruit of righteousness unto them which are exercised thereby.
So, it seems that the 39 books of the Old Testament are the "stripes" which chastise us and bring us to Christ...