It is speculated that the term "motherfucker" originated during the first and second world wars. At that time the meaning was more like "(person) is such a dishonorable and shameless bastard, they would even have sex with their own mother". Over time the meaning changed and became a broad term for anything the speaker doesn't feel like describing ("I'm hungry as a motherfucker", "When we finally get out of this motherfucker, I'm going to head straight home and go to sleep"), as well as an intensifier ("I'm so motherfucking sleepy", "You're a motherfucking idiot"). The reason "motherfucker" is used as an intensifier is not related to having sex with your mother; it's about the emotional content of the word. As you can imagine, accusing someone of having sex with their own mother is a very extreme allegation, and people want to add that same emotional extremeness and vulgarity to their statements. The current meaning is not really related to the act of incest itself but it's still a very vulgar word, and I can definitely see how this would be really, really weird to people learning English as a second language.