The concept of the sexual fetish and its origins are dealt with most directly and comprehensively by Sigmund Freud in his 1927 essay "Fetishism". Surprisingly short in length (only six pages long), the essay's basic assertion is that the sexual fetish, an over-sexualization of a particular object which would usually not be sexually exciting, arises in order to disavow the reality that the female lacks a penis.
One of the first issues Freud grapples with is the word he should use to describe the boy's ignoring the fact that women have no penis. In particular, he debates between the use of the term "scotomization" or "disavowal". Eventually, he decides that disavowal is the more appropriate term, for a scotomization of the lack of a penis would imply that the boy erases this lack from his memory completely, while the reality is that the boy "refuses to confirm the truth of [the] statement" (this quote comes from the definition of disavowal from the Merriam-Webster Dictionary). In the case of a fetish, rather than accept the lack or intentionally forget that the lack exists, the boy imbues an object with a power to replace the lack of penis; he "refuses to confirm the truth of [the] statement" that women have no penis by instead affirming the truth of the statement that women do have whatever is fetishized (e.g., women do have feet, women do have undergarments, etc.). Thus, the fetish transforms the truth of a lack into the lie of a presence of something that is just as powerful as what the lack would have been.
Freud then moves on to a discussion of the origin of the fetish. He posits that the fetish is not just a simple replacement of the penis as a phallic object, or even always an object that covers up the lack of a penis. Often, Freud says, the fetish takes the form of that which the male saw immediately before realizing the supposedly jarring and frightening fact that the woman lacks a penis. This would be a complete disavowal of the lack. In other cases, the fetish is something which is able to conceal or cover up the genitalia, and thus is neither a complete disavowal nor a complete affirmation of women's lack. Rather, this fetish provides an unsurity as to what is covered up, and could imply a host of possibilities (the woman is castrated, the woman is not castrated, the man is castrated, the man is not castrated, etc.). Finally, Freud observes that if a man has a particularly strong connection with his father, the fetish often takes the form of that which has the ability to castrate, as often the boy believes that his father is that one who does the castrating. This final fetish form is a complete affirmation of the lack and the assumption of power over that lack.
This leads into a review of castration. The reason that the male first fears the female genitalia is because he believes that because the female has no penis and was castrated, then the same frightful attack could happen to him. The fetish is thus formed as a defense mechanism from the notion that the man will be castrated.
With this idea of castration and its relations to the fetish, we can see that the basic argument framing this essay is indeed of male power, or an affirmation and description of the patriarchy confirmed by the supposed power of the penis and the parallel power to usurp the power of the penis through castration. One primary way in which Freud goes about making this argument is through his use of the metaphor. Early on in the piece, Freud compares the fright of seeing the castrated woman to "a similar panic when the cry goes up that Throne and Altar are in danger". This equates the penis to ruling authority and power of government or church. It says that just as the man feels his power and authority questioned when he observes legitimate government bodies being questioned, he feels his penis threatened when he observes the other's castrated penis.
Not only does this empower the penis, but it also gives power to the ability to castrate or overcome castration, for if those attempting to overthrow the "Throne and Altar" had no power, they would not be a threat. Those rebels or castrators have just as much power as the penis does, and thus to fight off those rebels or castrators is also a display of power. This is demonstrated further on in the essay, where Freud uses another metaphor to compare the fetish to "a token of triumph over the threat of castration and protection against it". By rejecting the notion that the woman has been castrated by employing the fetish, the male also rejects the notion that the man who would have castrated her had the ability to, and thus affirms his power to castrate and to resist castration over the power of others who failed to castrate the woman. This patriarchal power is then not only expressed as power over women (whom Freud regards in the essay in an overtly sexist way as having a lack of penis, that is, less than a man, and whom he never assumes as having the power or ability to castrate), but also as a competition among men.
One example Freud uses to explain this competition is in the example of the two boys who lost their father at young ages. Of the two, one of his patients, Freud says, dealt with the death by "oscillat[ing] in every situation in life between two assumptions: the one, that his father was still alive and was hindering his activities; the other, opposite one, that he was entitled to regard himself as his father's successor". In the first case, the boy is competing with his father for power, for he knows that both he and his father, as men, have both penises and the ability to castrate. In the second case, the father's death does not confer grief upon the boy, but rather power as the boy becomes his father's heir.
Finally, Freud ends with the assertion that "the normal prototype of inferior organs is a woman's real small penis, the clitoris". For those heterosexual men who do not concoct a fetish in an attempt to procure power, the clitoris is the place of maintaining power over women. Rather than admit that the woman does not have a penis and thus was castrated by another man and thus that that other man has more power than the self, the man sees the clitoris and says that the woman does have a penis. However, as that penis is smaller, the woman thus does not have as much power as the man. This then maintains the man's power over both women and over other men.
To conclude, Freud's "Fetishism" essay is, in essence, an explanation and justification for patriarchy and the power of the penis. In this case, patriarchy is not only the expression of illogical male superiority over women, but also over homosexual men, for Freud says that gay men don't have the same ability or power as other men to create a fetish or defense against castration. Specifically, Freud uses the idea that both having a penis and being able to take away a penis justifies male superiority.