It's mostly (i think) a bug. On my current playthrough. the sniper O-five got it when i found Skippy (so, it can appear at random?), and every pieces of Johnny's clothes has it too.
River's gun will have it when he gives it to you too, but it will loose the "quest" flag at the end of the mission.
I guess some script sometimes add the flag when it shouldn't (and don't remove it), or forget to remove it...
On the plus side, you can upgrade them and still keep a copy of it!
On the other hand, i now have a blue, a purple and an orange version of every pieces of Johnny's clothing with a sniper stuck in my inventory... It's starting to feel heavy x)
Edit: I'm not 100% sure O-five got it when i found Skippy, but i noticed it when Skippy took automatically my first weapon slot and i had to equip O-five again...
It may even explain HOW O-five became my "forever in your inventory" gun...