There are several metal working operations made on a barrel. The stuff you saw was likely from chambering. A chamber is cut by running a shaped tool( called a reamer) into the bore as a step near the end of the process and cuts the shape to hold the cartridge. It is always wise to clean a barrel thoroughly before firing any thing. other eeratins are threading the shank, extractor cuts on certain styles, drilling for sights are examples.