They obviously grew bigger if it was advantageous to do so. Not every species of dinosaur would gain an advantage thru being larger, so not all species grew to an enormous size.
Humans are going the same way. Taller people are more successful, earn more money, and have more children. Therefore, every future generation will be bigger than the one before, until it becomes a disadvantage (or no advantage) to be larger.
There's no reason why we can't have 20-feet-tall ants in the future. It's just natural selection.
There appears to be a reason:
Atmospheric oxygen level and the evolution of insect body size.
Insects are small relative to vertebrates, possibly owing to limitations or costs associated with their blind-ended tracheal respiratory system. The giant insects of the late Palaeozoic occurred when atmospheric PO(2) (aPO(2)) was hyperoxic, supporting a role for oxygen in the evolution of insect body size. The paucity of the insect fossil record and the complex interactions between atmospheric oxygen level, organisms and their communities makes it impossible to definitively accept or reject the historical oxygen-size link, and multiple alternative hypotheses exist. However, a variety of recent empirical findings support a link between oxygen and insect size, including: (i) most insects develop smaller body sizes in hypoxia, and some develop and evolve larger sizes in hyperoxia; (ii) insects developmentally and evolutionarily reduce their proportional investment in the tracheal system when living in higher aPO(2), suggesting that there are significant costs associated with tracheal system structure and function; and (iii) larger insects invest more of their body in the tracheal system, potentially leading to greater effects of aPO(2) on larger insects. Together, these provide a wealth of plausible mechanisms by which tracheal oxygen delivery may be centrally involved in setting the relatively small size of insects and for hyperoxia-enabled Palaeozoic gigantism.