In front-load washers, this piece of pliable plastic forms a seal when the door is closed, preventing any of the wash water that is touching it from escaping.
A washing machine's drain function removes water from the tub during the spin cycle. The washer pump forces water from the bottom of the appliance into the drain hose.