Someone was casting out demons in the name of Jesus when the dicsiples saw him. They probably said something like, "You can't use Jesus' name to cast out demons--you're not one of us. We're disciples. We're the only ones allowed to use Jesus' name."
They tell Jesus what happened, probably thinking he'll give them kudos for protecting the "Jesus Inc." brand name. But Jesus says the following:
But Jesus said, "Do not forbid him, for no one who works a miracle in My name can soon afterward speak evil of Me.
Jesus says, "Yeah, they can use my name and the power behind it to do miracles. Even if they aren't my followers (yet)."
I've tended to be more like the disciples and think that the more spiritual I am the more access I should have to the power of the Holy Spirit. But Jesus says I shouldn't be surprised if I see miracles from people who aren't Christ followers. I suppose that also extends to Christ followers who are immature or who have doctrine I think is off-base.
In another place Jesus tells about people who prophesy and work miracles in his name without knowing him. Jesus says they won't make it into heaven even though they moved in spiritual power. Being known by Jesus and following him is what saves us.
So if the non Christ followers or immature can work miracles and prophesy I would think that mature followers should have even more of the gifts of the Spirit at work in us. Sadly, I haven't seen that in my life.
So I'm on a journey to unlearn my spiritual prejudices and accept the fact that if Jesus knows me I can do the impossible.