A sect of sentient robots, members of the Lawful Neutral 'modron' robot race, were tasked with figuring out why mortals liked to "adventure", so they designed an adventure simulator machine. The robot sect's (!) superiors were unwilling to commit the resources to building such an elaborate device in their home of Mechanus, one of the Lawful Neutral outer planes, because it would require too much of their limited and lawfully regulated energy.
So they decided to build a portal to the plane of Limbo, a Chaotic Neutral outer plane. When in Limbo, anything that a sentient being thinks about will materialize. Simply bringing the Adventure Simulator blueprints into Limbo caused it to be built around them - a maze populated by NPC robots that spout cliche villain stuff:
But existing in a plane that is defined by pure chaos, machines have the potential to break in catastrophic and amusing ways.
The Evil Wizard construct becomes self-aware and decides to take over the Simulator. It disintegrates the top ranking modron and sends forth its construct minions to eradicate the rest of the modrons. The modrons have never experienced being without a leading giving them orders and are just milling about aimlessly - one of them goes crazy, shifts alignment to Chaotic Neutral, and names himself Nordom. Nordom will join your party and help you dismantle the Evil Wizard.