Umar Ibn al Khattab RA explained this himself and so did some Sahaba.
Normally I avoid quoting text walls but here it is necessary because most of the (lengthy) hadith contains sections relevant to your questions:
Narrated Jubair bin Haiya:
Umar sent the Muslims to the great countries to fight the pagans. When Al-Hurmuzan embraced Islam, Umar said to him. "I would like to consult you regarding these countries which I intend to invade " Al-Hurmuzan said, "Yes, the example of these countries and their inhabitants who are the enemies of the Muslims , is like a bird with a head, two wings and two legs; If one of its wings got broken, it would get up over its two legs, with one wing and the head; and if the other wing got broken, it would get up with two legs and a head, but if its head got destroyed, then the two legs, two wings and the head would become useless. The head stands for Khosrau, and one wing stands for Caesar and the other wing stands for Faris. So, order the Muslims to go towards Khosrau." So, `Umar sent us (to Khosrau) appointing An-Numan bin Muqrin as our commander. When we reached the land of the enemy, the representative of Khosrau came out with forty-thousand warriors, and an interpreter got up saying, "Let one of you talk to me!" Al-Mughira replied, "Ask whatever you wish." The other asked, "Who are you?" Al-Mughira replied, "We are some people from the Arabs; we led a hard, miserable, disastrous life: we used to suck the hides and the date stones from hunger; we used to wear clothes made up of fur of camels and hair of goats, and to worship trees and stones. While we were in this state, the Lord of the Heavens and the Earths, Elevated is His Remembrance and Majestic is His Highness, sent to us from among ourselves a Prophet whose father and mother are known to us. Our Prophet, the Messenger of our Lord, has ordered us to fight you till you worship Allah Alone or give Jizya (i.e. tribute); and our Prophet has informed us that our Lord says:-- "Whoever amongst us is killed (i.e. martyred), shall go to Paradise to lead such a luxurious life as he has never seen, and whoever amongst us remain alive, shall become your master...
[ Sunnah.com Reference: Sahih Bukhari 3159 ]
So we see from the first sentence,
Umar sent the Muslims to the great countries to fight the pagans
According to Jabir, Umar was already in process of developing a general plan to conquer the pagan nations. The fact he specifically used the word Pagan proves he was doing this on the basis of religion, not some arcane national security calculations as implied by another answerer here.
reading further, Umar asks for advice about how best to attack a list of countries he has in mind. just think about that for a second.if the goal is self defense, is it sensible to fight everyone one after the other.
many expansionist empires made that their entire purpose, like the British empire yet they could not accomplish it as quickly as Umar Ibn al Khattab and the Rashidun in general did. in light of this fact its extremely strange to think he managed to accomplish the fastest expansion of an empire "through self defense"
Now that should be enough to refute conjectures of national security being the reason,
secondly: read the first contact between al Mughira and the persians.
an interpreter got up saying, "Let one of you talk to me!" Al-Mughira replied, "Ask whatever you wish." The other asked, "Who are you?"
the persians literally got up and asked "who are you"? They don't even know who the arabs are and have no clue what's going on
Al Mughira goes on to give a speech summarising who arabs are and what they've been doing for ages, and then summarised the Islamic mission of Jihad. this completely puts paid to any idea there was a security concern as the main basis for the conquest of persia. The fact al Mughira explained in such detail proves the persians by and large had no idea who the Muslim Arabs even were.
Ive really been pushing against the "security" interpretation so far, and the reason is it is so obviously a modern method of "coping" with parts of Islam that contradict liberal values. Offensive jihad exists, read UmH's answer for a good summary of it.
Anyway, now let's summarise and analyse the actual reasons cited by Umar and al Mughira as the reason for the attack:
The first: Umar already had a general plan to conquer the MUSHRIK nations,
The Second: This extract from al Mughira's Speech:
the Lord of the Heavens and the Earths, Elevated is His Remembrance and Majestic is His Highness, sent to us from among ourselves a Prophet whose father and mother are known to us. Our Prophet, the Messenger of our Lord, has ordered us to fight you till you worship Allah Alone or give Jizya
As you can see, the reason is that the Prophet told them to do so. This could mean three things, possibly all of them at once.
It could be referring to the Verse of the Qur'an:
Fight those who do not believe in Allah nor in the Last Day and who do not forbid what Allah and His Messenger have forbade and who do not adopt the religion of truth from those who were given the Scripture until they give the jizyah willingly while they are humbled (9/29)
the connection is obvious, because al Mughira mentioned that the command was to fight the persians until they either become muslim or pay jizya. This is the only verse of the Qur'an directly relevant to that, however I don't think this is whats being referred to by al Mughira, because he specifically mentions that the prophet told them to do so. If he was referencing the Qur'an It doesn't make sense to call it a prophetic commandment, even if the qur'an arrived through the prophet. You would cite the command on the authority of Allah, because his is greater than the prophet's. I mentioned it anyway though, because it is what would appear in most people's minds.
the closer connection in my opinion, is with this general speech the prophet used to give to his soldiers regarding jihad, who to fight, why to fight and when to stop:
Fight in the name of Allah and in the way of Allah. Fight against those who disbelieve in Allah . Make a holy war, do not embezzle the spoils; do not break your pledge; and do not mutilate (the dead) bodies; do not kill the children. When you meet your enemies who are polytheists, invite them to three courses of action. If they respond to any one of these, you also accept it and withhold yourself from doing them any harm. Invite them to (accept) Islam; if they respond to you, accept it from them and desist from fighting against them. Then invite them to migrate from their lands to the land of the Muhajireen and inform them that, if they do so, they shall have all the privileges and obligations of the Muhajireen. If they refuse to migrate, tell them that they will have the status of Bedouin Muslims and will be subjected to the Commands of Allah like other Muslims, but they will not get any share from the spoils of war or Fai' except when they actually fight with the Muslims (against the disbelievers). If they refuse to accept Islam, demand from them the Jizya. If they agree to pay, accept it from them and hold off your hands . If they refuse to pay the jizya, seek Allah's help and fight them. When you lay siege to a fort and the besieged appeal to you for protection in the name of Allah and His Prophet, do not accord to them the guarantee of Allah and His Prophet, but accord to them your own guarantee and the guarantee of your companions for it is a lesser sin that the security given by you or your companions be disregarded than that the security granted in the name of Allah and His Prophet be violated. When you besiege a fort and the besieged want you to let them out in accordance with Allah's Command, do not let them come out in accordance with His Command, but do so at your (own) command, for you do not know whether or not you will be able to carry out Allah's behest with regard to them.
[ Sunnah.com Reference: Sahih Muslim 1731a ]
and in addition to being in Sahih Muslim, this hadith is found in really early books of the Salaf too, like in the Sahifah Hammam and Musnad Abu Hanifa, it is essentially impossible to reject this without also implictly rejecting nearly every other Hadith.
Anyway, as you can see it was a general rule of the prophet's to give a speech of this type before invasions, and it is very likely that such a speech is what mughira was referring to, because of the fact it mentions going out to invade and giving the enemy the options of conversion, jizya, war.
There is actually another Hadith proving the Prophet originally planned to invade Persia too, but he died before he could accomplish it.
And in this case, notice how the prophet states *Who is to be fought, as a general rule (remember, burayda said this was a general speech given many times)
Fight against those who disbelieve in Allah
this is yet more clearcut proof that the reason for fighting is kufr.
moreover, you don't really "give three options" to people who are attacking you. It's a silly idea, giving an ultimatum to a person who is chasing you around with a sword.
That's something you do when you go out to the people you intend to convert.
I hope that clarified the historically and Islamically correct reason for the Invasion of Persia (which Included Iraq) and sorry about the lazy structure of the writing