Personally I doubt it's a bug. Now I'm not a programmer but I know the following
A) They were planning to introduce this kind of variance soon
B) Something like this would have had to have been coded. Random level assignation just doesn't happen out of the blue unless the code was already there
So it stands to reason that perhaps, by accident, the code got implemented before everything else was ready. I don't know. Personally I hope the way levels are handled are different than levels in an MMO otherwise it undoes the entire point of the level numbers (as a joke), and would severly undermine balance. Personally I want to believe Valve isn't going to screw things up, but as a realist I know even great developers can have bad ideas.
In the meantime though I refuse to delete my leveled weaponry, even the Level 0 KGB, just in case.