So how you get here sort of makes sense in that context: if reproduction is more successful if you delay it to collect resources, then it also follows that discarding any biomass you don't need once you've got enough to ensure the reproduction happens quickly and successfully afterwards would lead to this sort of strategy in extremis.
A "prototype" caterpillar doesn't need to be able to fly - it just needs to do something which makes it more mobile and slightly more successful (and well, getting away from where you're born and spreading out is a good way to ensure the gene line isn't killed off entirely by one lucky predator).