Leto II was teaching humanity a lesson, it took them thousands of years to realise the lesson which he was teaching them, mankind was stagnant before Leto II's death the empire of 1million planets was not growing, what Leto II, did was closed off everyone to there own planets, gave them boring peaceful lives, he controlled them to the point where as soon as his grip was released people wanted to break away and that is what the scattering was, the scattering created diversety in the human race which is what Leto II saw as the only way to save it