I know its used in the Black Templar but where does it originate?
You mean in-universe or historical precedent? In-universe I believe the concept art for Templars mentioned that it's so they can never be without a weapon
Remnants: A log whereupon a veteran attempts to piece an army together from scraps and trades
Danger! May contain Oingo Boingo
in Real Life it originated in the good old hack 'n slash days at the least by the Middle Ages when a cord was bound to your weapon and then looped around your wrist to keep it from being lost in combat or becoming disarmed.
The designers' notes accompanying the release of the 4th edition Black Templars Codex in White Dwarf made mention of the chains being symbolic of the Templars never laying down their arms while ceaslessly crusading (similar to how all the lamps they carry are about them carrying the Emperor's light to the dark corners of the galaxy).
Its pretty cool how the authors are showing how similar the Legions are to one another whilst maintaining key differences. Where they absorb each other's traits and customs by fighting alongside them, sort of like today.
Reason not to hate Mat Ward #62: Mat Ward used the well designed spine of the Grey Knights Codex to 'Ward' off chavs who were harassing a group of nuns]