When in doubt, consult Saint Peter Mohila.
"The commemoration of the third day signifies that the deceased believed in Christ, who rose from the dead on the third day, also that the deceased observed the three theological virtues of faith, hope, and love. In the commemoration of the ninth day we implore God to number the deceased among the 9 choirs or ranks of angels who perpetually surround the throne of God in heaven. The commemoration of the fortieth day reminds us of the forty day fast of Christ following the Baptism and the forty days between His Resurrection and His Ascension. It also imitates the 40 day period of mourning observed by the people of Israel following the death of Moses."
(quoted in "Family Memorial Book" published by the Ukrainian Orthodox Church of the USA)
Other people and other saints a have different rationale for the 40th day commemoration. Personally, I like Saint Peter's reasons since they make reference to the life of Christ.
Dave