I can't say I recall an anchor on Mausers, but those are inspector stamps. In a factory, each inspector was given a unique stamp so he could show that he had inspected the rifle or some part of it and approved. If the part turned out bad, the inspector was in trouble. The various marks showed an OK at the various stages involved in producing the barrel.
Marks were often numbers or letters, but some factories also used symbols, with stars, crosses, and anchors being among them. There is no connection with Navy usage. The same idea was used in the ticket punches carried by railway conductors.
Jim