Law and Politics'
Arbitrary comes from the Latin arbitrarius, the source of arbiter; someone who is tasked to judge some matter. An arbitrary legal judgment is a decision made at the discretion of the judge, not the law. While this is occasionally acceptable, calling a judgment arbitrary generally has strong negative connotations implying that the arbiter has not reached a conclusion based on the evidence. At best, a decision was made for the sake of making some decision at all; at worst, it can imply tyrannical or corrupt judges using arbitrary standards irrelevant to the law. For instance, such arbitrary standards would include ruling in favor of whichever litigant the judge personally likes more, ruling in favor of co-religionists over other litigants, or flipping coins to determine a criminal's penalty. In some countries, a prohibition of arbitrariness is enshrined into the constitution. Article 9 of the Swiss Federal Constitution theoretically overrides even democratic decisions in prohibiting arbitrary government action. This can extend to laws with nonsensical justifications as well; the US Supreme Court has overturned laws for having "no rational basis."
Arbitrary actions are closely related to teleology, the study of purpose. Actions lacking a telos, a goal, are necessarily arbitrary. With no end to measure against, there can be no standard applied to choices, so all decisions are alike. Note that arbitrary or random methods in the standard sense of arbitrary may not qualify as arbitrary choices philosophically, if they were done in furtherance of a larger purpose; in the examples above, discipline in school and avoiding overcrowding at gas stations.
Nihilism is the philosophy that believes that there is no purpose in the universe, and that every choice is arbitrary. According to nihilism, the universe contains no value and is essentially meaningless. Because the universe and all of its constituents contain no higher goal for us to make subgoals from, all aspects of human life and experiences are completely arbitrary. There is no right or wrong decision, thought or practice, and whatever choice a human being makes is just as meaningless and empty as any other choice he or she could've made.
Many brands of theism, the belief in a deity or deities, believe that everything has a purpose and that nothing is arbitrary. In these philosophies, God created the universe for a reason, and every event flows from that. Even seemingly random events cannot escape God's hand and purpose. This is somewhat related to the argument from design, the argument for God's existence because a purpose can be found in the universe.
Arbitrariness is also related to ethics, the philosophy of decision-making. Even if a person has a goal, they may choose to attempt to achieve it in ways that may be considered arbitrary. Rationalism holds that knowledge comes about through intellectual calculation and deduction; many rationalists (though not all) apply this to ethics as well. All decisions should be made through reason and logic, not via whim or how one "feels" what is right. Randomness may occasionally be acceptable as part of a subtask in furtherance of a larger goal, but not in general.