I'm not sure about the real etymology, but I suppose a rule (line) is a special case of a rule (instruction): things should be aligned with this line.
- there is a decision on how to measure things ( this affects prices taxes and commerce )
- there is an association between the power to enforce a standard and the instruments of that standard
- the measure instruments are generally very straight