Iranians, I believe, are considered 'Non-Hispanic White' according to the most recent US census from 2020. Here's some information about it from Wikipedia:
So, technically they're 'white' in a government sense; but socially? Absolutely not. They're distinctly Middle Eastern. But even then, that's quite a broad brushstroke to paint. Like you said, there's various different ethnic groups within Iran; and Iran is distinct from the other ME countries.
Why Middle Easterners and North Africans have been grouped with Europeans is due to an outdated anthropology racial taxonomy/classification.
https://en.wikipedia.org/wiki/Caucasian_race
They were grouped together, largely because of 'phenotypically' similar features. Essentially they have common skull, face, and body features.
There's also some linguistic and cultural connections.