Wiki Answers explains the current meaning is to give someone the chance to prove their honesty or reliability. It originated to mean evaluation of the quality of whiskey. The U.S. government sought to pay off debt in the late 1700s by taxing whiskey distilleries. That caused many producers to make “bootleg” whiskey, and some had low alcohol content. You could determine whether alcohol content was high or low by capping some in a glass bottle and shaking it vigorously for a few seconds. The whiskey had low alcohol content if the top-layer of froth lingered. The “head” of froth disappeared almost immediately in whiskey with high alcohol content. The test had to be done with hard shaking, or a “fair shake.” The expression became a metaphor for business transactions and the measure of a personal character by the early 1800’s.