I have shown how rules are like laws and in a government a legislative body enacts the laws, so who in sports has the power to legislate? Every sport or game has a governing body with a legislative arm. As an example, in basketball the governing body can be as simple as two people in a pickup game agreeing to a set of rules or as complex as a major international federation, like FIBA.
Just as the body itself can take many forms, the nature of the legislative arm can vary between different governing bodies. These often closely model the different forms of legislatures that exist in politics.
There is anarchic rule by consensus, such as the pickup game example. There are also parliamentary systems such as the NFL, which requires a rule to be proposed and evaluated by the competition committee, published, and then voted upon by the owners to be enacted. Finally, there are autocratic systems in which a single member or a small board simply evaluates and modifies the rules as it sees fit or necessary, such as the NASCAR competition committee. It should be noted that unlike in government, none of these systems has shown itself to be better or worse in terms of abusing power or the quality of the rules produced.
Some governing bodies, like the USGA, produce model rules that can be adopted or modified for use by parallel or smaller bodies. As in any federal system, the rules of an international federation serve this purpose for the smaller bodies under its jurisdiction in addition to serving as competitive rules at the highest level.
As they are less formal and usually governing societies much smaller than governments, there is often a fair amount of overlap accepted between the different branches of governing bodies. The legislative arm is usually the most independent branch, as few sports have a judiciary that is truly independent from the executive.