The Prophet ﷺ said, "The example of the person abiding by Allah's order and restrictions in comparison to those who violate them is like the example of those persons who drew lots for their seats in a boat. Some of them got seats in the upper part, and the others in the lower. When the latter needed water, they had to go up to bring water (and that troubled the others), so they said, 'Let us make a hole in our share of the ship (and get water) saving those who are above us from troubling them. So, if the people in the upper part left the others do what they had suggested, all the people of the ship would be destroyed, but if they prevented them, both parties would be safe." (Using translation from Bukhārī 2493)
قَالَ رَسُولُ اللهِ ﷺ مَثَلُ الْقَائِمِ عَلَى حُدُودِ اللهِ وَالْوَاقِعِ فِيهَا كَمَثَلِ قَوْمٍ اسْتَهَمُوا عَلَى سَفِينَةٍ فَأَصَابَ بَعْضُهُمْ أَعْلَاهَا وَأَصَابَ بَعْضُهُمْ أَسْفَلَهَا فَكَانَ الَّذِينَ فِي أَسْفَلِهَا إِذَا اسْتَقَوْا مِنَ الْمَاءِ فَمَرُّوا عَلَى مَنْ فَوْقَهُمْ آذَوْهُمْ فَقَالُوا لَوْ أَنَّا خَرَقْنَا فِي نَصِيبِنَا خَرْقًا فَاسْتَقَيْنَا مِنْهُ وَلَمْ نُؤْذِ مَنْ فَوْقَنَا فَإِنْ تَرَكُوهُمْ وَمَا أَرَادُوا هَلَكُوا جَمِيعًا وَإِنْ أَخَذُوا عَلَى أَيْدِيهِمْ نَجَوْا جَمِيعًا