From what I understand, it is needed if a perfect seal when connecting the colon sections is not attained. The surgeon pumps air or water (I forget exactly what gets pumped) in to test the seal. If bubbles are emitted, then the seal isn't perfect and the surgeon has the opportunity to try again. The maximum times he or she can do this is twice, so if the seal isn't perfectly tight the second time, a temporary ileostomy bag is needed until nature takes its course and the tissue heals up and seals. That's my basic understanding.
P.S. I have expressed extremely strong wishes not to have an ileostomy bag. Therefore, my surgeon is using staples instead of sutures because staples provide for a better seal.
Wife of 4/12/17 Dx age 45
5/19/17 - Lap left hemi
Tumor size: 5 x 4 x 1 cm
T3 N2b M1a
Stage IV A
lymph nodes: 9 of 54
CEA: 1.4 Pre-op; 2.1 2 days Post-op
Tumor extension: Invasive through muscularis propria into pericolic fat
Proximal margin: >14 cm Distal margin: >14 cm Mesenteric margin: 3 cm
Lymphovascular invasion present
Lynch - unlikely; KRAS wild
Immunohistochemsistry: Normal expression of MLH1, MSH2, MSH6, and PMS2