Dump it out whenever you feel it needs to be dumped.
I generally dump ash out right before I relight a bowl I have set down but come back to.
I generally smoke a pipe for 2-8 mins, then put it down and come back to it later. When I pick it up give it a slight tap on the side while it’s upside down and ash fall out.
I don’t but discovered a neat trick. The wind blew my pipe and just the ash floated off in a cloud, so you can gently blow on the bowl, tamp and then blow. Again I don’t bother, but you can, especially indoors
With deeper chambered pipes (i.e., two inch depth or more), I sometimes stir the loose ash and dump; it’s easier to keep the airflow going and relighting is a bit easier when not having to draw the flame through a thick layer of ash. With shallower chambers I usually just continue to tamp.
Sherlock Holmes made a great deal of progress in many a case by examination of the ash of tobacco products left behind by suspects at crime scenes. So as a rule, when I'm committing murder I keep the ash in its place. Otherwise I dump it a couple times per bowl.