Why were prayer and fasting required for casting out the demon?

Tags: #<Tag:0x00007f27727305c8> #<Tag:0x00007f27727304d8>

So I always wondered about a scripture and maybe someone can explain it. When the disciples could not cast out a devil, Jesus told them that this kind goes not out but by prayer and fasting. However, prior to that, he told them that if they have faith as a grain of mustard seed, they could move mountains. If it only took a small amount of faith to do anything, why were prayer and fasting required for casting out the demon?

Jessica Kerns Willis