Compromising a law that is Bein Adam La'Makom (between man and God)
Compromising a law that is Bein Adam La'Chaveiro (between man and man)
ר' יהודה ור' יוסי הוו קא אזלי באורחא אחזיה בולמוס לר' יהודה קפחיה לרועה אכליה לריפתא א"ל ר' יוסי קפחת את הרועה
The Gemara relates that Rabbi Yehuda and Rabbi Yosei were walking on the road when Rabbi Yehuda was seized with bulmos. He overpowered a nearby shepherd and ate the bread that the shepherd had in his hand, since his life was in danger. Rabbi Yosei said to him: You have robbed that shepherd.
תשובה ותו דכתיב דרכיה דרכי נועם וצריך שמשפטי תורתינו יהיו מסכימים אל השכל והסברא
...Further, it is written [of Torah] “its ways are pleasant ways” [Proverbs 3:17] and the Torah’s laws must be consistent with intellect and logic.