Intercourse During Periods and Post-Natal Bleeding: Why Is It Prohibited?
Question

What is the wisdom behind the prohibition on having intercourse with one's wife when she is menstruating or bleeding following childbirth? 
If the reason for the prohibition is the blood because it is impure, then is it permissible to have intercourse using a barrier like a condom?
Praise be to Allah.Prohibition of sex during periods 
Allah has forbidden men to have intercourse with their wives in the vagina at the time of menstruation. 
The Quran clearly stated the reason for this prohibition, which is that menstruation is adha (a harmful thing). Allah says (interpretation of the meaning): 
“They ask you concerning menstruation. Say: that is an Adha (a harmful thing for a husband to have sexual intercourse with his wife while she is having her menses), therefore, keep away from women during menses.” [al-Baqarah 2:222] 
Scientific studies prove the harm of having intercourse during period  
Scientific studies in this field have disclosed to us some of the harm that is referred to in this verse, but they have not managed to describe all the harms that are referred to in the Quranic text. 
Dr. Muhiy al-Din al-‘Alabi said: 
“It is essential to refrain from having intercourse with a menstruating woman because doing so leads to an increase in the flow of menstrual blood, because the veins of the uterus are congested and prone to rupture, and get damaged easily; and the wall of the vagina is also susceptible to injury, so the likelihood of inflammation is increased, which leads to inflammation in the uterus and in the man’s penis, because of the irritation that occurs during intercourse. Having intercourse with a menstruating woman may also be off-putting to both the man and his wife, because of the presence and smell of blood, which may make the man impotent (i.e., uninterested in sex).” 
Dr. Muhammad al-Bar said, speaking of the harm that may be caused to the menstruating woman: 
“The lining of the uterus is shed during menstruation, and the uterus is scarred as a result, just like when the skin is flayed. So it is vulnerable to bacteria and the introduction of the bacteria that are to be found at the tip of the penis poses a great danger to the uterus.  
Hence the penetration of the penis into the vagina at the time of menstruation is no more than the introduction of germs at a time when the body is unable to fight them.” 
Dr. al-Bar thinks that the harm is not limited to what he describes of the introduction of germs into the uterus and vagina which is difficult to treat, rather it also extends to other things, namely: 

The spread of infection to the fallopian tubes, which may then become blocked, which in turn may lead to infertility or ectopic pregnancy, which is the most dangerous kind of pregnancy.
The spread of infection to the urethra, bladder and kidneys; diseases of the urinary tract are usually serious and chronic.
Increase of germs in the menstrual blood, especially gonorrhea germs. 

The menstruating woman is also in a physical and psychological state that is not conducive to intercourse, so if it takes place it will harm her a great deal and cause her pains during her period, as Dr. al-Bar said: 

“Menstruation is accompanied by pains, the severity of which varies from one woman to another. Most women experience pains in the back and lower abdomen. For some women the pain is unbearable and has to be treated with medication and painkillers.
Many women suffer depression and stress during their period, especially at the beginning, and their mental and intellectual state is at the lowest level during menstruation.
Some women suffer migraines just before their period starts, and the pain is severe and causes visual disturbances and vomiting.
Women’s sexual desire decreases, and many woman have no interest at all in sex during their periods. The entire reproductive system is in a state that is akin to sickness, so intercourse at this time is not natural and serves no purpose, rather it can cause a great deal of harm.
A woman’s temperature drops during menstruation, as does her pulse and blood pressure, which makes her feel dizzy, exhausted and lethargic.” 

Dr. al-Bar also mentions that the harm is not only caused to the woman by having intercourse with her, rather the man is also affected by this action, which may cause infection in his reproductive system which may lead to sterility as a result. The severe pains suffered as a result of this infection may be even worse than the sterility it causes.  
And there are many other harmful effects, some of which have not yet been discovered, but Allah has referred to them when He said (interpretation of the meaning): 
“Say: that is an Adha (a harmful thing for a husband to have sexual intercourse with his wife while she is having her menses), therefore, keep away from women during menses and go not unto them till they are purified (from menses and have taken a bath).” [al-Baqarah 2:222]
Allah has described it as adha, a harmful thing both for the wife and for the husband, and other harmful effects about which Allah knows best. 
Thus it becomes clear that the prohibition on intercourse at the time of menstruation is not just because of the blood, rather it is for many reasons as stated above. 
The Muslim must also obey the command of Allah, for He is the Creator and He knows best what is good for His slaves and what is harmful to them. He is the One Who says “keep away from women during menses”, so even if the reason behind this is not clear, we must still submit to the command of Allah Who has commanded that a man should not have intercourse with his wife during this time.
References:
Al-Hayd wa’l-Nifas wa’l-Haml bayna al-Fiqh wa’l-Tibb by Dr. ‘Umar al-Ashqar. 
Tawdih al-Ahkam by al-Bassam, 1/362. 
However it is permissible for a man to be intimate with his wife, without having intercourse (at the time of menstruation). 
For more, please see these answers: 7838 , 36740 , 36722 , 36864 , 70438 , and 1852 .