Maybe she broke the law in the country that she was living in...
You need to at least Google. She broke no laws, was only in Iran to see family and friends. There is absolutely no suggestion that she was there for any other reason, beyond Boris Johnson (who'd clearly done as much research as you) slavering shite which meant that her case was sunk.
She is an entirely innocent woman, no proof whatsoever otherwise, being held and mistreated in an Iranian jail, separated from her husband and young child, for absolutely no reason.
That's not an opinion, or speculation, it's a fact.
She is there because the Foreign Secretary didn't do his job.
Another fact.