Why There Was a Dianoga on the Death Star (Legends)
One of the most iconic scenes in A New Hope, if not the entire Star Wars saga as a whole, is the trash compactor scuffle. I say scuffle not in reference to the antagonising struggle against an impending and gruesome death, rather the daring duel with an unusually placed dianoga. Sure, flooded areas of garbage and sewage were the perfect conditions for such beasts, but how on earth did a ten-meter-long squid find its way aboard the Death Star? Well, let's find out!
To answer the question of how an adult dianoga could worm its way into a relatively small trash compactor, we need to understand their origins and evolution. So, in accordance with Star Wars Legends, dianogas emanated from the murky, humid world of Vodran. Over the millennia, however, many in their microscopic larval forms stowed away on rather unsanitary ships for transportation across the galaxy. This resulted in the emergence of dianogas in trash compactors, garbage pits and sewers alike from Teth all the way to Coruscant.
Initially, dianogas didn't pose much of a threat. In fact, they were considered more of a nuisance than anything else. If they grew to a length of 3 meters or above, however, panic and fear quickly arose. But due to their ability to produce salvageable minerals and metals upon feeding off organic waste, as well as their extermination of vermin, they were still considered to be invaluable assets by many – including the Galactic Empire. This is why they purposefully placed a dianoga in at least one of their trash compactors. Yes, rather than making its way onto the Death Star as a tiny organism, the infamous sewage squid was let loose among a plentiful supply of recyclable material.
So, there we have it: a perfectly reasonable explanation as to why a dianoga was present on the Death Star. But don't worry, I'm not going to gloss over the subsequent, glaring question of how it survived each compression. You see, the large beast merely burrowed into one of the walls where it hid away until the process' culmination. And that, ladies and gentlemen, is a bonus bit of trivia for you all to enjoy.