So what is the serial number for?
Realistically, mandatory serial numbers are a means of government control, so that ordinary people can be forbidden from having legal guns.
One of the ideas, is if a gun is used in a crime, and the gun is traced back to the legal owner (mandatory gun registration), then the gun owner will be found criminally responsible.
The idea is to keep making gun ownership more onerous and legally dangerous, so as to render gun owners a small, politically ineffective minority.