For beginners its to show how distasteful this material world is.
For devotees who are little advanced is to cause them to remember the shelter of the Supreme person.
For devotees who are recipients of His special mercy he will take away everything that stops them from complete surrender.
For a very advanced devotees like Kunti, it will cause them to be in constant association with Krsna in person.
For ultimate devotees, such as gopis, the suffering is bringing out sublime rasa.