I believe when babies are first born they're incontinent and can't control their bladder or bowels but once they get to a few months old then I think they gain control of their bladders and bowels but just can't and don't know how to use a toilet so they wear diapers.
I know toddlers hold in there urine and poop and let it out at one time.