It makes perfect economic sense. Don't burn oil that you could otherwise sell at a premium to oil consuming countries. The US, China, Russia are standing in line for oil.
Nuclear lasts forever. Oil may not.
Of course I don't believe that the Iranians are only going nuclear for the power, but the argument "they have so much oil why do they need nuclear?" is no longer valid.
If their nuclear ambitions were peaceful, they would not have spent millions building underground nuclear facilities. When you combine nuclear ambitions with hardened facilities, there is one and only one conclusion.