All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger. We ask Allaah to exalt his mention as well as that of his family and all his companions.
Performing Ghusl (ritual bath) after sexual defilement is a matter that is ordained by Allaah without Him informing us exactly the wisdom behind it. Some of its wisdoms, however, could be deduced from the narration of the Prophet in which he stated that if a person who had sexual intercourse wants to have another intercourse, he should perform ablution, as this renders him more active sexually. [Al-Haakim] So, if ablution makes the person more energetic and active, then there is no doubt that performing Ghusl is even more beneficial and yields greater benefits. If this matter is scientifically studied, it would certainly reveal many wisdoms and benefits.
To conclude a Muslim is ordained to fulfil Allaah's orders, and the orders of the Prophet whether or not he knows the wisdom thereof.
Allaah Knows best.