Most probably it was some blacksmith way back when hammering steel tubing into the shape of a handle on their anvil. The phrase “stable door handle” has long been common parlance – the end bent back towards the door was presumably intended to prevent bridles from snagging.