Hypocrites are cowards; they reveal their true colors in times of difficulty
Hypocrites are very fond of their comfort. Since they are insanely attached to this world, they are terrified of death. If all the conditions and means are in their favor, then they act together with Muslims. So long as their interests are not harmed, they lay low and stay small among Muslims, even if it is hard for them to do so; they even face up to doing many things they do not want to do for the sake of appearing to be one of them. They do not want to perform their daily prayers but they do. They do not want to do good to Muslims, but even though it pains them to do so, they do good when the situation calls for it. They even occasionally serve Islam if it comes to that point. But if there is any pressure, difficulty or hardship put on Muslims by unbelievers, they instantly start to make 'gain and loss calculations'. They consider what they would be gaining and what they would be losing if they stay with Muslims. And they take into account that the possible hardships awaiting Muslims would more or less touch them as well. That is one of the greatest fears of a hypocrite; because it is themselves that they value more than anything in the world and this would hurt them. Right at this point, they decide to leave Muslims. In a verse of the Qur'an God draws our attention to the cowardice of hypocrites:
They swear by God that they are of your number, but they are not of your number. Rather, they are people who are scared. (Surat at-Tawba, 56)
Living on the path of God and participating in an ideological struggle on the side of the truth requires courage in face of ordeals. When we look at the Qur'an, we see that all the prophets and righteous believers have been tried with severe ordeals and hardships. All these difficulties daunt hypocrites because at the time of hardship there are many topics one needs to relinquish. When Muslims are faced with hardships, they sometimes sacrifice their possessions, sometimes their comfort, sometimes the time they spare for doing sports or even for sleeping; they sometimes make sacrifices about their clothes, sometimes about their food, and sometimes they sacrifice all of those. Each of these sacrifices is a pleasure for them. But the hypocrites who have devoted all their lives to this world find this very difficult and terrifying. That is why when the hypocrites face difficulties they try to find another place for themselves to seek refuge in.
In the Qur'an, God informs us of the kind of excuses hypocrites at the time of our Prophet (pbuh) came up with to avoid difficulties:
If it had been a case of easy gains and a short journey, they would have followed you, but the distance was too great for them. They will swear by God: "Had we been able to, we would have gone out with you." They are destroying their own selves. God knows that they are lying. (Surat at-Tawba, 42)
The times of difficulties, hardships and trials Muslims face are actually very valuable times in which the hypocrites reveal themselves and show their true colors. They might camouflage themselves among Muslims for many years, but when they meet a challenge on the Path of God, they instantly show their true colors. Every threat, injustice, pressure or slander faced on the Path of God is an honor for Muslims. For a hypocrite, on the other hand, that would almost mean giving up this world. Accepting such a situation would mean their giving up their hypocrisy, which they would never, ever do.