Children may require an ostomy bag for a variety of reasons, including congenital anomalies, inflammatory bowel disease (IBD), trauma, or certain types of cancer. Procedures like a colostomy, ileostomy, or urostomy are performed based on the specific medical condition.