The design of the sphinx, as a social system to manage enormous populations to a choreographed destination, is much older than the physical structure of the sphinx itself. The design relates all the way back to the labyrthinian towers guarding the gates of hell.
There are four ages to the world. The first age of the world features humans which are within the realm of metabolic fast. Recall a board game, Cribbage, and notice the layout of the Cribbage scoring board. Skunk and double skunk. Now how did that happen? That one made fast. Humans which were beginning to degrade and break down could be rehabilitated. The very nature of the architecture of the labyrinths was designed to assess and remedy faults within the person. A particular fault or injury would influence the individual to choose a known path through the labyrinth, making predictable known decisions at intersections and turning points, and if the individual was practing properly then the surrounding architecture, within the religious practice which led the individual there, would gently curb them to stretching out the afflicted areas and overcoming wounds.
The second age of the world witnesses the humans no longer achieving metabolic fast. The enslaved paper-patting monkeys taught the humans the art of mummification and, after uncovering more technology through the foliage layer, the humans have now produced a model line of surgical eunuchs to keep up a good show.
The third age of the world sees the surface and the mining projects. Hit the ground running the same scripts and routes and box law system that has been running for eighty percent of the foliage layer. If the eunuchs and other surgical abominations ever became too influential in the world the towers had tear gas (from thousands of years of day old bread processed and saved in vats) and bleach (from thousands of years of disembodied hands poking soap) stored up in torpedo tubes. The last remnants of the doomed Zechariah were supposed to flip the light switch, pull the bell rope, and send all of the monsters to hell on a 688. The eunuchs and surgical abominations had long since infiltrated the tower temple system and, if Zechariah ever entered the Noah's ark to swamp the human salad lettuce to hell, he found himself on a redrocketsled ride or hopelessly holding a tattered bell rope and wondering how long it had been since the wiring on the light switch had been checked. The mining projects were planned as doomsday projects when the tear gas and bleach system was finally accepted as completely broken. What happens when entire column towers of tear gas are mixed with entire warehouses of bleach? Alcohol (a few fractional distillations to anything) and vulcanization (sulfur) agent for car tires.
The fourth age of the world features Gad waking up in the basements of the mining projects. Now the world runs as a four hundred year carnival, rotating around the already completed wheel of possible technology, shipping all of the idiots to hell by the tried and true routes which they tested and perfected as they cut down the foliage.
The temple system in the first age of the world was supposed to rehabilitate and remedy the humans. At some point the system began to work in the opposite direction. The improperly practicing humans would enter the labyrinths seeking physical rehabilitation and, due to improper fault stacked upon improper fault stacked upon improper fault, they would be caught in degenerating spirals, making the wrong decisions, counting by ten (for the money), missing the exits on the elevens and twelves, missing the license plate checks in the check girder check short girder practice religion, and eventually the humans make their way through the towers and demand their right to pass through that door, find their destiny, and go to hell.
In a folk tale sense the story presents itself in a somewhat more dramatized form. The forty thieves are built on an older system represented by stonehenge—twenty or so different occupations and life routes known to take all the participating witches to hell. Stonehenge is a set formed from an even earlier system; mortician, midwife, and anaesthesiologist. All three are part of a community of witches going to hell. The ancient midwife is left around with the mortician, Tobit, in some representations now twisted up into a dog (Tobit! Stop playing with the dead bodies!), and the anaesthesiologist, Adam, the hopeless heroin addict. She can't understand why the two won't get up to make fast, they walk on their clodhoppers, they're lucky to count to twenty on their fingers and toes, Tobit is nosing around on whatever is laying around and doesn't move, and Adam moves only if there's a heron dart and a chicken in sight. She is going to kick the two into shape, march them into that ancient labyrinth, get them to count the numbers, pick up their heels, raise their hands, and work out all the kinks and get things back to the way they should be. Right, because humans have been losing fast and going to hell for several thousand years already, but she's at the end of her rope and grasping for any straw possible to solve the problem.
Marching Tobit and Adam into the sphinx mine the midwife soon discovers that Tobit wandered off his own direction, they took the wrong routes in the physical therapy structure, her calls aren't being answered, and she herself cannot remember if that notch next to that glyph means count an extra four steps to the next check short girder or count two less to the next check girder. Well, maybe if she modifies the anaesthesiologist to look more like her then, together, they'll be able to at least find the mortician again.
Rotate that through a few thousand years and iterations and soon you have a surgical eunuch working on perfecting an obelisk eunuch and all obsessing over dogs. Down to Israel's time there is now an entire population of malfunctioning fools wandering around the sphinx in scripted torah-routes, all missing the exits on the elevens and twelves and continually throwing themselves into the tragic disasterous injury boxes for money.
"We've been wandering around this tomb for so long that we can't tell if we're on the way in or the way out anymore."
"Those guys are blind, they have a good sense of direction, ask them."
"Hey, Levites, are we on the way in or the way out?"
"Uh, guys, totally… we're on the way in."
and then the eunuch pops up with a big bright smile.
"You sure are, honey! Keep going! HA HA HA!"
Ali Baba and the Forty Thieves, all of the collections of playbooks of various day of atonement party settings and scripts, and all of the different box configurations which those scripts may be conducted in, are all a product of the mortician, midwife, and anaesthesiologist demanding entertainment—as long as they're hopelessly locked in the tomb and not actively being driven to hell quite yet. The scripts to get people killed in a passive aggressive "nobody knows anything" manner have been worked on and refined to infinity and beyond. From the mortician, midwife, anaesthesiogist beginnings of the first chicken witch passover pole, through the addition of the forty thieves, through the fantasy stories of Abram, Isaac, and Jacob Israel, and then on into the gospel era; nobody knows anything, everybody goes to hell.