At least two possibilities
The first is that the Death Star trash compactor had been used so rarely or that the station had been serviced so little that an ecosystem had begun to develop inside the trash compactor and who knows where else in the Death Star and a large tentacle beast had grown in this would be womb deep inside the most destructive weapon in the galaxy
The second is they just threw a tentacle monster in the trash
Not to de-funny a great post, but what if the tentacle monster is part of the trash system? Like what if it organically breaks down parts of the trash (eating them, spitting weird acid on them, etc) to chemically return needed elements and break down toxic ones?
It vanishes before the trash compactor cycle begins, which leads me to think maybe it has a hidden chamber where it can retreat when the organic slurry it’s made of the ship trash needs to be Squanshed to make room for new garbage.















