So there's an idiom in English: "Beats me"
Usually it is represented by the emoji character as 🤷
I assume it refers to "X beat Y at Z" in the sense of being defeated in a conflict or competition. As in, "rock beats scissors".
Ok but there is this forked off, evolved idiom in the clade, that is "beats the fuck out of me". That's interesting because there is this linguistic trick of emphasis by inserting "fuck" (e.g., "who the fuck knows?"), and I assume its appeal traffics on that.
But there is also an unrelated use of "fuck" as a sort of escalation for "shit" as a vulgarity. Usually "shit" had a literal meaning, in a way that "fuck" doesn't but it is taken metaphorically anyway so it's accepted. Like you might have said in the past (and as a lower level of emphasis today) "scared the shit out of me", and instead you'd say "scared the fuck out of me".
And so we have this idiom "beat the shit out of someone", which is not the use of "beat" as in "defeat" but rather to pummel, to batter someone (pugilistically, or to have it done by an inanimate process such as bumping down a rocky hill).
And so that becomes "beats the fuck out of me", which is kind of beautiful in how it manages to be both kinds of paths to comprehension as an idiom. It means "I am very puzzled, it defeated me", and also it gets to use the "fuck" for emphasis ("expletive infixation", those fun at parties call it) while doing so by evoking the other idiom that means to be pugilized. It doesn't really make sense that way -- a conundrum might defeat you, but it doesn't beat you up, or at least that isn't what's meant in the typical use case of the idiom -- but by crossing the idioms, the emphasis can be introduced.
I hadn't noticed this before. Now I wonder if this is a recognized linguistic thing -- making a jazzy elide from one meaning to another to max a sort of cross product idiom -- and what are other examples.
Not give a flying fuck
An interesting one because the expletive infixation isn't "fuck", it's "flying". It has a nice alliteration, sort of like "rat's ass". But in this case, there isn't a real think called a "flying fuck", but it fits the grammatical form of English, and has the sound of what might as well be a real thing. It might even be sort of like tmesis (which is stuff like "un-fucking-believable").
I think the origin must be the escalation of "I don't give a fuck" into more extreme forms, after the first one became ubiquitous and lost its punch. The first evolution would have been, for example, "I don't give two fucks". I've heard "I don't give three fucks". Hard to go farther down that route, so adding more adjectival color to "fuck" seems to be the next move.
To be closer to the spirit of the first example, I think the "flying" would have to be part of another idiom that's being evoked. Maybe "when pigs fly"?