RE: Ruger 10/22?
Running a box of shells through your gun does a few things: 1st off-these are factory barrels, they're full of imperfections...running a few rounds through the barrel fills many of these imperfections with lead (usually with copper for jacketed rounds), which smoothes out the barrel... 2nd-it would exert high pressure on the barrel under high heat (temporarily) which will press the roughly/haphazardly arranged grain micro-structure of the steel of the bore faceinto a more streamlined and regular pattern...no, it's not going to perfectly allign the bore, and no, shooting a million shells won't create a perfect barrel, but these factors do increase accuracy.
Military marksman have believed in "fouling shots" for generations, filling the imperfections with fouling (carbon or copper) before calling your accuracy the "real" POI/POA relationship.