Iran are not going to outplay Spain so they have to play the way that would give them the biggest probability of winning. That’s what they are doing, not sure what the problem is.
they had a chance to go 1-0 up, if they went out and played they could have been 3-0 down