A lot of young children will have accidents because they forget, or don't want, to go to the washroom. That's true even if it is urgent. (They either don't know what their body is telling them, or they are fearful of washrooms, or they are simply having too much fun to be bothered by what their body is telling them.)