This is addressed in the Official Star Wars Fact File #57. The waste includes sewage, food waste and organics which are then left to fester. All of these would obviously contain amounts of water.
All waste, from durasteel girders to organic rubbish, found its way to
one of the many trash compactors in the Death Star. As such, the
Rebels found themselves swimming in a stinking pool that was filled
As to why there's still water in the chamber that our heroes land in, this is addressed in the Death Star Technical Companion. While some effort has already been made to reclaim and recycle free water, by this point in the 'compaction and disposal' process the bins are magnetically sealed to prevent cross-contamination with other bins.
The rest was sent through long waste chutes to one of the numerous
trash compactors for each zone. During the rescue of Princess Leia
from the Death Star's detention block, the princess blasted into just
such a waste chute. The trash would then be compacted into the
smallest possible size and then moved to a jettison compartment along
one of the trenches. Each of the bins and compactors was magnetically
sealed so that waste materials wouldn't leak into nearby compartments.
We also see in the Death Star Owner's Technical Manual that the dianoga are not merely tolerated but are actually bred and housed by the station's waste disposal personnel. It's not clear whether this is an officially sanctioned decision or just staff doing things to make their lives easier but either way, maintaining a wet, swampy condition in the waste bins is presumably an essential part of keeping these useful scavengers safe and happy.
Sometimes called 'garbage squid', dianoga evolved as marine scavengers
on the swamp world Vordan. Ages ago, dianoga slithered into the hold
of a space freighter, and the creatures quickly spread their
populations to many planets. Thriving in sewers and river canals of
large urban areas throughout the galaxy, dianoga feed on all types of
refuse, and can consume almost anything except pure metals. A dianoga
possesses seven tentacles it used for locomotion and to catch food,
and has a single, flexible eyestalk, which can extend around corners,
or up like a periscope from underwater.
Because dianogas can consume vast quantities of garbage, the Death
Star's service sector not only tolerates their presence, but actually
breeds them for use in the trash compactors.