Every dungeon or wizard's tower seems to have one to clean up the remains of adventurers. They are hyper efficient at what they do. They sweep up corpses & remains then spit out the treasures within to their 'masters'.
But where do the damn things come from? Well imagine having a demonic spy in your dungeon & residence listening in on every conversation, seeing everything happening, & privy to all your arcane secrets! Because that's exactly what almost every wizard, lich,red dragon tyrant who owns a gelatinous cube or one of the myriad of variations has in their basement!
Why because a gelatinous cube is the easiest thing that a black necromancer or wizard can summon. Hell, its almost but not quite a cantrip but a first level powerful spell.
The caster uses a simple summon circle to the Faceless Lord Juiblex & another Lovecraftian deity. Other entities must be appropriate to the campaign setting & within 1d4 rounds a miniature gelatinous cube forms within the circle. The cube doesn't have a mind per say but will seemingly follow the simplistic commands of its master the summoner. The summoner will detect no thoughts, ideas, or any other mental activity isn't going to show up. The cube is more of a storage medium & records everything that's around it. Later a small portion of the monster will return to its demonic or Lovecraftian masters to report all that its seen, touched,etc.
Lovecraftian gods of this type most often are from the Advanced Deities & Demigods by Ward & Kuntz especially Shub Niggurath . The Faceless Lord Juiblex & Shub Niggurath are responsible for birthing some of the most henious oozes, horrors, & jelly monsters across the planes when the summoner gets an unexpected & deadly result of their spell!
If the DM decides that a new monster is needed for an adventure then the caster gets far more then they bargained for. Black puddings, red oozes, stun jellies, even the occasional proto shoggoth has resulted from proper & botched rites.
Stun Jelly Fiend Folio
Treasures are looked over & evaluated in the dungeon, capabilities are accessed, & threats are measured on the planes prime across the multiverse. Every couple of 1d6 years a gelatinous cube will do an informational dump back to its masters! Beware the wrath of the Faceless Lord & its ilk my friends. Few wizards seem to realize the grave danger that they place themselves in when summoning these creatures!
Summon Gelatinous Cube
1st level Wizard Spell
Components -chalk, candles, small animal, the gloves of power
The caster creates a small 3 foot diameter circle of power in full moonlight using the forbidden & hidden names of The Faceless Lord Juiblex & Shub Niggurath. Within 1d4 rounds a gelatinous cube will begin to form and coeless into a familiar cube shape.
The caster will have had to prepare an enchanted pair gloves of rubber ahead of time for 1 gold piece each. These will allow the summoner to move the little proto monster as needed