Probably because they both displayed quickly one after the other in sequence, without waiting for user input in-between (ie Async) and so what you see is two dialog boxes, with the "age" dialog box top, because it was the most-recently displayed.
Ok, ok, you don't actually see the "name" dialog box (unless you have x-ray vision) because it's hidden behind the "age" dialog box that is on top of it.
But when you close that top one, the underneath dialog box - which has been hiding there the entire time - is revealed.