Let's say 5% of Iran's GDP is spent on energy. Not sure what the number is, but whatever. A big chunk but affordable for the economy as a whole. At the market price, maybe 10% of people cannot afford to consume enough energy to meet the necessities of modern life - cooking, not freezing to death, using transportation. If you don't want these 10% of people to be shut off from modern society, you need to subsidize somehow.
Historically, subsidising electricity has worked fairly efficiently, because it wasn't possible to effectively store and re-sell or export it.
2. It has always worked the same: people arbitrage the subsidy by doing energy inefficient labor. Bitcoin mining is just a more efficient arbitrage mechanism.
All those subsidies are given under the expectation that people will behave reasonably and only use what is necessary, because it gets the country running. It's taking a hit so that your citizens can live and thrive. When you suddenly have a bunch of people running thousands of GPU for magic internet money, that is not a reasonable use of it.
In my opinion it would be better to have normal energy prices and simply redistribute the money. At least it would give an incentive to use energy more efficiently
You don't make your economy more effective by having incentives to remain ineffective. This sort of arbitrage (crypto-mining) is a direct consequence of misguided subsidies: If electricity is essentially free you have no incentive to control your electricity consumption and that attracts heavy users, which pushes consumption up in a vicious circle and can lead to shortages.
Iran has oil so they can probably afford to keep energy prices very low but that does not help them over the long term.
A ban on crypto-mining is also very difficult to enforce, IMHO.