The aircraft is French territory but in order for the airline to gain traffic rights, it needs to respect the destinations country's laws and procedures. Much the same way Israel (used to/still does) require all pax seated with their seat belts fasten one hour before landing in Tel Aviv.
If I am not mistaken BA used to fly to Tehran via Cyprus so as the crew wouldn't need to night stop in Tehran.