"Let's hope that it will not happen to a living thing/life but it will happen to a material!
It is an expression that is used when something happens to one of your or somebody else's belongings . For example if you loose youror somebody else's key, bag or something else... or you break something which belongs to you or to somebody else you would here this idiom....and the person who tells this, does this to relief you andmake you remember that material things can always be replaced but not living things (life)!!
You have a Porche , a greeeeat car . But unfortunately you have had an accident and you look really really sorry. But your friend comes over and says : ' heey , don't be sad, it only does harm to your budget -wallet, it isn't problem if it doesn't do harm to your health... don't be sad ..'
It isn't problem if it doesn't do harm to your health, if it does harm to only your budget ,that isn't problem...