A rein is a harness, like what is used on a horse. According to Oxford,
reign (n) means, "1 the period of rule of a monarch. 2 the period during which someone or something is predominant or pre-eminent."
The phrase "free rein" refers to the former word. It implies giving or having "freedom of action or expression." It is as though one is free from the reins that might otherwise restrict or control them. On the other hand, one can "keep a tight rein" on something or someone.
AskOxford: rein