I think it is a serial/stock number. We do that with our weapons in the arms room so it is easier to decipher who's weapon is who's. Here is a forum that has some M1's with stamped numbers.
I don't know about American practices, but I know that Denmark always stamped the serial number on the stock. As jaguwar said, it made it easier to find the gun when they are stacked up in the armory.