I’m sorry, you must be at least a level 4 friend to unlock my tragic backstory
I have asked this myself in the past and never gotten an answer.
Maybe today will be the day we are both finally enlightened.
It’s a way of referring to particular variations of (usually) a character — dark!Will, junkie!Sherlock, et cetera. I have suspected for a while that it originated from some archive system that didn’t accommodate spaces in its tags, so to make common interpretations/versions of the characters searchable, people started jamming the words together with an infix.
(Lately I’ve seen people use the ! notation when the suffix isn’t the full name, but is actually the second part of a common fandom portmanteau. This bothers me a lot but it happens, so it’s worth being aware of.)
Bang paths (“!” is called a “bang” when not used for emphasis) were the first addressing scheme for email, before modern automatic routing was set up. If you wanted to write a mail to the Steve here in Engineering, you just wrote “Steve” in the to: field and the computer sent it to the local account named Steve. But if it was Steve over in the physics department, you wrote it to phys!Steve; the computer sent it to the “phys” computer, which sent it in turn to the Steve account. To get Steve in the Art department over at NYU, you wrote NYU!art!Steve—your computer sends it to the NYU gateway computer sends it to the “art” computer sends it to the Steve account, etc. (The “!” symbol was chosen because it was on the keyboard, not too visually noisy, and not used for a huge lot already.)
It became pretty standard jargon, as I understand, to disambiguate when writing to other humans. First phys!Steve vs. the Steve right next to you, just as if you were talking to the machine, then getting looser (as jargon does) to reference, say, bearded!Steve vs bald!Steve.
So I’m guessing alternate character version tags probably came from that.
Additionally, it allegedly first appeared within the X-Files fandom, but it’s hard to find actual sources because the Usenet archive on Google Groups ignores the !