You raise a very good point here, probably the most important consideration if one wishes to defend Israel's and US's recent bombing of Iranian nuclear research sites. I don't know any legitimate civilian purpose to enrich uranium to near-weapons grade... except to eventually produce weapons grade material.
Honestly Iran NEVER needed to enrich uranium if it only wanted nuclear electricity. It could have imported enriched uranium fuel rods for its nuclear reactor. Spending so much on deeply buried enrichment facilities was ALWAYS about getting nuclear weapons.