The stomach served as a digestive organ for food. It would take a sarlacc a millennium to complete the digestion of its prey, a drawn-out execution which Jabba the Hutt intended to inflict upon Luke Skywalker, Han Solo, and Chewbacca.
Subsequently, on Endor, Han scolded Chewbacca for acting impulsively based on hunger, which led to them being ensnared in an Ewok trap after he grabbed a dead animal.
StarWars.com specifies that the Millennium Falcon was situated in the gullet of the space slug, rather than its stomach.