The way I read that story is that Jesus is trying to teach his disciples how to engage with the world, that their wishes, desires, and words have power. He starts off with displays of anger, when he curses the fig tree, and throws out the money-changers.
Why does he curse a fig tree? Well, think about the lesson he was trying to teach. Anything you want to do, trust in God and it will be done for you. But he is too good and forgiving to curse a person. So instead, in order to teach the lesson, he cursed a fig tree instead, going on to say that if he had cursed a mountain to throw itself into the sea, it would have happened.
He proceeds with a message of forgiveness. It would have been a sin for Jesus to curse a person, and Jesus does not sin, but he knows that his disciples are not the son of God and Man would indeed use the power of God to curse other people. So he warns against the possibility of sinning by calling on his followers to forgive before praying for deliverance.