The ancient Hebrew and Greek versions of Psalms 40:6 are quite different. The Hebrew version says 'my ears you have opened' whilst the Greek LXX has 'a body you restored to me'. Furthermore in Hebrews the LXX is quoted as part of an argument that God never intended the sacrifices of animals to atone eternally for any sins but that this was predicted to be taken on by the Messiah 'who had a body prepared for him', for this final atonement.
My question is how did the LXX possibly interpret the Hebrew text in this way?
Hebrew Based Translation
6 Sacrifice and offering you did not desire— but my ears you have opened— burnt offerings and sin offerings you did not require. 7 Then I said, “Here I am, I have come— it is written about me in the scroll. (The New International Version. (2011). (Ps 40:6–7). Grand Rapids, MI: Zondervan.)
Greek Based Translation in the LXX
7* You did not want sacrifice and offering, but a body you restored to me. You did not ask for whole burnt offering, and an offering concerning sin. 8* Then I said, “Behold, I have arrived. In the scroll of the book it has been written concerning me. (Brannan, R., Penner, K. M., Loken, I., Aubrey, M., & Hoogendyk, I. (Eds.). (2012). The Lexham English Septuagint (Ps 39:7–8). Bellingham, WA: Lexham Press.)
Note: I did do some research and found out that there is evidence to support ancient Rabbinical application of this Psalm to the Messiah. This fact might help explain the LXX version but it does not seem obvious by any means.
Gen. 4:25. The language of Eve at the birth of Seth: ‘another seed,’ is explained as meaning ‘seed which comes from another place,’ and referred to the Messiah in Ber. R. 23 (ed. Warsh. p. 45 b, lines 8, 7 from the bottom). The same explanation occurs twice in the Midrash on Ruth 4:19 (in the genealogy of David, ed Warsh. p. 46 b), the second time in connection with Ps. 40:8 (‘in the volume of the book it is written of me’—bim’gillath sepher—Ruth belonging to the class מגלת). (Edersheim, A. (1896). The Life and Times of Jesus the Messiah (Vol. 2, p. 711). APPENDIX 9 LIST OF OLD TESTAMENT PASSAGES MESSIANICALLY APPLIED IN ANCIENT RABBINIC WRITINGS)