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 4/17 Dx age 45
5/17 - Lap left hemi
5 x 4 x 1 cm
T3 N2b M1a
Stage IV A
lymph nodes: 9 of 54
8/17 Sub-total colectomy
2nd tumor 5.5 cm T1 N0
CEA: 1.4, 2.1, 1.5, 1.9, 1.9, 2.1, 2.1, 2.4, 1.7, 2.0
Lynch no; KRAS wild
Immunohistochemsistry: Normal MLH1, MSH2, MSH6, and PMS2
Tumor DNA variants: MTOR, APC, TP53
Liver left hepatectomy seg 4 1/31/18