The overflow pipe is responsible for draining away all excess water from your bathtub once the water hits a certain level in the bathtub. It also helps to prevent flooding in your bathroom.