Hot melt glue remains flexible after it has set and so is good for repairing flexible things, like sticking the sole back on a shoe. Where a wire is soldered to a circuit board a blob of hot melt glue is very good for preventing the wire from flexing and breaking at the solder joint.