In a mechanical system, energy is dissipated when two surfaces rub together. Work is done against friction which causes heating of the two surfaces - so the internal (thermal) energy of the surfaces increases. Adding lubricant between the surfaces reduces this friction and so less heat is wasted.