That is an easy one to answer. It is because sometimes God wills sinful people to suffer possession; so that they return to God. Still others are possessed that are completely innocent.
Why would Jesus Christ ask someone completely innocent to suffer possession, if he casts our demons in the Gospel? You have to look at the Big Picture. Well, all suffering can be said to be for the Glory of God. Firstly.so that the individual would be raised to a greater sanctity in Heaven. Secondly, for the salvation of other souls, vocations,souls in purgatory,families,etc.. Suffering whether through possession, oppression, infestations, temptations conforms us to Christ, who said "take up your Cross daily, deny yourself, and follow me." Jesus Christ did not perform miracles just to relieve our ills. He used these "signs" and wonders to prove to us His Divinity, that His Kingdom had arrived to believe in Him as our Saviour. Although some people may be personally guilty of sin that brought on possession, many are victims, innocent of blame. St. Paul says "I make up in my body what is lacking to the suffering of Christ." And in another place, "I begged the Lord to take this angel of Satan from me, but the Lord said "My grace is sufficient for thee."
These people who Christ calls to suffer possession are called "victim souls." They actually trap Satan and lessen people like me and you exposure to Satan. These are saintly people who follow the directives of their spiritual advisors. They know Christ intimately and many bear His Wounds. These are extraordinary people of Grace; and these are those that like Padre Pio, St. Catherine of Siena, St. Therese of Avila, and other Saints.
This is not very popular in the mainstream Church today. And, if you are not closely united to Jesus Christ, you can end up a "**SOUL VICTIM**" as Rev. Dominic Syzmanski states in "A Notebook on Exorcism and Possession." By luck, I was able to purchase this book on Amazon.com for $15 plus shipping. Now copies are going for many times that price.. The pages of the book I purchased were loose and without thinking I glued them together. I should have made copies for those interested.
People say things like "Rather than read about the gory details of exorcism (their words not mine), I rather read a good book about the lives of a Saint!" Only what Saint was not challenged by Satan? Best example I know is Padre Pio.