The first reason is that the Iranian government is also a Shiite believer, and they share the same beliefs as the Shiite militia. Although one of them is an Iranian and the other is an Iraqi, they believe in the same Sect and the same belief, so naturally they are close and can leave. Moreover, the Shiite militia in Iraq is also very strong, and Iran's support for them is equivalent to finding itself a reinforcement.
The second reason is that those Shia militia groups oppose the Iraqi government, which is exactly what Iran needs. After all, Iran and Iraq fought a tough battle over such and such issues, and the relationship between Iran and Iraq is still very tense until now. Whether out of the same religious belief or out of the principle that the enemy of the enemy is a friend, Iran should also win over and support the Shiite militia, because they can help Iran against the Iraqi government.
The third and most important reason is that Shiite militia are also actively resisting the United States, which is the most important demand of Iran at present. After all, Iran is now an enemy of the United States, and the United States has suppressed and sanctioned Iran in many ways. Seeing that Shiite militia can actively resist the United States, the Iranian government will certainly support this difficult fire. Although their strength is limited, they can also cause some harm to the US military, which is very consistent with Iran's purpose.