They needed the best ones to survive. But what was the purpuse behind that? Why not fly away and find other places to conquer? Insects like to move from one place to another, to expand their empire. These guys have been smashing their heads against that specific wall, keeping the best of their kind in amber for when they were needed.
Now the heart has been exposed and carried away from Pandaria, and they are following it.
It may not be what Blizzard has planned, but it fits their story without negating their previous reasons.
The purpose was to cull the weak. To make the Mantid Empire stronger over time. And not just that, but likely also because of limited supplies. If the mantid didn't lose so many in each generation then their lands likely couldn't sustain a population spiraling out of control. If their goal was to get the heart and not to just cull their weak, then it would make more sense for them NOT to attack in a predicable cycle when the Pandaren would be ready for them.