It was narrated from Abu Hurairah that the Messenger of Allah ﷺ said: "When (a man) sits between the four parts of his wife's body and exerts himself, then Ghusl becomes obligatory".
The purpose behind this obligation is twofold; firstly, it serves as an act of purification for both husband and wife which helps them spiritually prepare themselves for their next meeting with Allah; secondly, it serves as an act of respect towards one another since they are now bound together through marriage. Furthermore, by taking a ritual bath after engaging in sexual intercourse they are also showing respect towards their own bodies since they are now considered sacred due to their marital status.
In conclusion, this hadith teaches us that we should always strive to maintain our purity and respect our own bodies even when we engage in intimate activities such as sexual intercourse with our spouses. We should also remember that Allah has made certain obligations upon us which must be fulfilled if we wish to remain within His good graces.