R’ Aryeh Kaplan zt”l noted in a class once that Chazal number the melakhos as “40 missing 1”. It could be a shorthand for 39, much the way the “i” is placed before the last “x” in the Roman numeral version “xxix”. People using Roman numerals would think of a number that ends in "9" as a "missing one" from the round number.
And even that may be a prosaic piece of the puzzle; it's how the non-Jews around us wrote numbers.
However, there is also significance to forty as forty. The acts of creation is described in mishnah Avos (5:1) as being 10 utterances -- "בַּעֲשָׂרָה מַאֲמָרוֹת נִבְרָא הָעוֹלָם". Based on a verse in Yeshaiah (43:7), “כֹּ֚ל הַנִּקְרָ֣א בִשְׁמִ֔י וְלִכְבוֹדִ֖י בְּרָאתִ֑יו יְצַרְתִּ֖יו אַף־עֲשִׂיתִֽיו׃ -- everything (1) called in My name and for My Honor, (2) I created it, (3) I formed it, (4) I even did it” The Zohar derives from this verse that each act had 4 aspects. Thus yielding 10 * 4 = 40.
The same 40 shows up as a symbol of birth and rebirth in the number of days of rain in the flood, the number of years it took us to mature into a nation in the desert, the number of se’ah of water in a miqvah, the number of days after gestation before the soul enters the fetus as well as the gender is determined, etc…
But of the 40 acts of creation, one is creation ex nihilo (making something where there was nothing), yeish mei’ayin. Since people can’t rest from creating something from nothing — we can not do it altogether during the week either — the rest of Shabbos is very much a break from “forty missing one” activities.
And “forty missing one” is also the maximum number of makos (lashes) meted out as punishment, given the person could survive that many. They are given in sets of three: on the right, the left, and the middle, and separated by a pause for a medical inspection — can the person handle another three?
The 39 melkhos can be broken down into four categories: The first 11 melakhos listed in the mishnah (Shabbos 7:2) begin with planting, and describes the steps necessary to grow the wheat, turn it into flour, and make the lechem hapanim, the showbread. The next 13 are about preparing the cloth of the curtains of the Mishkan, from the wool to the dying to the weaving and sowing. Seven melakhos relate to preparing hides into leather, and the last 8 are simply “none of the above.
Ashkenazim make 39 windings on our tzitzis — also in groupings of 7, 8, 11, and 13. Yemenites wind their tzitzis in groups of 3. The Shulchan Arukh haRav rules both -- double knots separating the windings the same way other Ashkenazim would, but also a daisy chain of smaller knots down the side grouping the windings into 3. Notice again the same convergence of symbolic numbers.
Just as tzitzis are worn “so that you will remember all of My mitzvos“, so too Shabbos commemorates the creation of the whole, and the punishment of makkos is to bring someone back after having violated the purpose of the whole. "Forty missing one" is used in all these cases as a number indicating the entirety of human action.
(Any errors are likely because R' Kaplan passed away 33 years ago, meaning that we're relying on the accuracy of my memory of a talk given over something like 34-35 years ago.)