Because Khamenei preferred to prioritize Russia and Arab militias over Iran's national security. He wasted 35 years of Iran's resources on a nuclear program that eventually ended up bombed by the US.
There will be no gorilla warfare because first of all, the US is not planning to invade Iran on the ground and secondly, Iranians will not unite in support of the current regime. If any sort of warfare takes place, it will be civil war.
In fact, the US is most likely counting on a planned transition of power in Iran. They will probably weaken anti-riot forces, the police and the IRGC to make that happen.