You Americans don't get it.
Israel and US murder our scientists.
They try to stop our progress towards nuclear energy.
They put sanction on us so we can't buy things like air planes and our planes are old and they crash and people die.
...
All because of what? Because they believe we want to build stupid nuclear bomb -which we don't- and they have no evidence of it.
So we stay in a war. Peace is never going to become a reality. And It's Americans fault.
Why is Iran developing long-range missiles with the capability of carrying nuclear warheads in parallel to its nuclear program?
Iran has been involved in multiple wars by proxy for a while now, it is unlikely an opportunity to arm itself with nukes will arise and they will not take it.
Most likely because it is a non-Arab power in the Middle East that is threatened on two sides by the world's only standing super power -- a super power that has routinely threatened invasion of Iran. Look at the WikiLeaks cables that exposed the pressure from other Middle Eastern governments for the US to invade Iran. Given the geopolitics, Iran's desire for nuclear weapons is perfectly rational.