What do ethical conduct (sila) and compassion have to do with the cessation of dukkha? As I understand the Third Noble Truth, the cessation of dukkha is brought about by ending craving. I can see how, for example, practicing renunciation, or seeing no self, assist us in achieving this, but how do ethics and compassion practices like lovingkindness lead us to achieving the end of craving?
Dukkha comes not just from craving, but from unsatisfied craving, in other words from inner conflict between "is" and "should".

Sila, Prajna, and Samadhi are three methods to remove and prevent that conflict: coarse, middling, and subtle conflict.

Sila helps remove and prevent coarse behavioral conflict, like obvious conflicted states of Obsession, Negativity, Egoism, - and their real life results, which manifest as various kinds of conflict. 

Prajna helps remove and prevent middling intellectual conflict, through analysis of dharmas, understanding how things work, understanding Three Marks of Existence, and Emptiness, understanding the limits of mind's models and perspectives.

Samadhi helps remove and prevent subtle emotional conflict, like states of negativity, unsatisfaction, craving for a different life etc.

So to answer your question, it helps by reducing, removing and preventing conflict between "is" and "should" which manifests as Dukkha.