The funding of groups like Hezbollah and Hamas has been allied with Iran and other close associates like Syria. Due to the fact that Iran cannot compete in terms of military strength with countries like Israel, it has adopted the use of terror groups to accomplish its political and ideological purposes. Although these groups have been receiving funds and donations from other sources, funding from Tehran has remained the major source of income.
In fact, this funding has been made public because Iran's budgetary estimates contain funds for these groups. Apart from monetary funding, Hezbollah and Hamas have been receiving political and weaponry support from Tehran. In addition, these groups have also been receiving training from Iranian military troops.
According to the Iranian revolution of 1979, protection Iranian citizens was one of the ideas and main objectives that led to the formation of this group. Due to this fact, the country has to continue funding these terror groups because they act as Tehran liberation movements or forces. In fact, the group was formed on the basis of Prophet Mohammad that stipulates a real Muslim is the one who provides assistance to a fellow person during the time of need.
Due to this fact, since the government of Iran does not have the power and strength to confront Israel, it has been using these groups in the name of helping its citizens gain freedom from invasion of Israel troops. In fact, these groups have played a major role in destabilizing Israel plans concerning Gaza and Palestine.
In fact, due to this principle, Palestine has been one of the areas where these groups have camped due to the oppression it has been experiencing since 1948. However, this does not happen for free. There are some major reasons why Iran channels its resources to these groups. The first reason is the supremacy battle.
Although the economy of Tehran cannot be compared with that of Washington, the country has been trying its level best to prove to the United States that it has a say. When the United Nations or White House tries to come up with policies that oppress Tehran, it responds through these groups. And because members of these groups are located in different part of the world miles away from Tehran different threats are issued. View here for more info.
In fact, when these countries try to touch the nuclear program, the groups will react immediately. On the other hand, Tehran has decided to help Palestine withstand Israel oppression. This is done through terror activities that get support from Iran. This is because Tehran and Jerusalem have been rivals for a long time. Click here for more on Iran funding: https://en.wikipedia.org/wiki/Funding.