Narrated 'Abd Allah b. 'Abbas: The Messenger of Allah ﷺ combined the noon and the afternoon prayers, and combined the sunset and night prayers without any danger or journey. Malik said: I think it so happened during rain. Abu Dawud said: Hammad b. Salamah narrated it like manner from Abu al-Zubair, it has also been narrated by Qurrah b. Khalid from Abu al-Zubair. He said: It is so happened in a journey that we made to Tabuk.
Furthermore this hadith also teaches us about being mindful of our environment; if there is any danger present then it would be better not to combine prayers but rather pray them separately at their designated times for safety reasons instead of risking one's life unnecessarily just for combining prayers which is not mandatory anyway according to Islamic teachings but rather an optional act of worship depending on one's circumstances at hand whether they are travelling or not etc..