Foreign reporters visiting Iran are usually in an echo chamber. They visit Tehran and a few other big cities. Live in best parts of those towns and hang out with people who are educated and pro western and quite exposed to other cultures. Iranian middle class (and specially the younger generation which are the majority) are pro western, quite progressive and modern. But they don't represent the whole population of Ir…
That. Same with media cherry-picking some favorable tweeters from a country (usually upper middle class younger people aligning with its biases) and promoting them as "the voice of their people" or some bogus "new generation" that's about to bring change.
It's even worse in places with strategic interest, where e.g the government puts obstacles to foreign corporations to grab resources on the cheap or prevents foreign diplomatic influence in the region, in which case there are lots of media, "NGO"s and such sponsored by foreign powers (a modern-day "radio free europe" affair), and the foreign media gets their "facts" and opinions from them and pretend they reflect the country at question, its interests and what the majority of the population believes. A lot of times some opposition party is sponsored too, and played big, even if it's supported only by a small minority.