To be fair, this is just the end of their life cycle.
They spend 13 days as eggs,
25 days as caterpillars,
two weeks as a pupa,
then they hatch into their final adult stage to live for one week..just long enough to mate and pass on their genes.
They are probably most vulnerable to predators when they are moths, so it makes sense to stay in that form for the minimum number of days, & not waste any time eating.
Thank you for the enlightenment!
i guess they eat when they are growing up!