Some say that the ancient Hebrews had a counting system, which only went up to forty. Hence forty years in the desert, and all the other uses of forty in the Bible. Or at least, that they thought that forty was a very big number, the largest many people knew, so they used it as a general term for big numbers, the way we use "billions" today.