The story of Marine's being allowed to keep their firearms is based on fact.
In the old days before WWII, a retiring Marine was allowed to BUY his rifle.
A lot of GI issue guns were stolen and brought home by GI's.
Most of these were pistols, which were easier to hide in duffel bags.
How much risk there was depended on the commanders of the unit, and the officer in command of a returning troop ship.
Many officers looked the other way, but very few would tolerate stealing rifles or automatic weapons.
In some cases officers just didn't care about pistols being taken by troops, others were dead serious against it as what it was...stealing Government property.
I read several accounts of GI's being told that a troop ship was going to be searched and anyone caught with a GI issue firearm would be in BIG trouble and wouldn't be mustered out.
Many of them threw guns overboard, only to never have any search done.
Other troop ships were searched.
The majority of stolen firearms were pistols, with much less stealing of rifles, carbines, or especially automatic weapons.
When people think a weapon was brought home by a vet, it's often a mistake in terminology.
An old vet says "That's the weapon I carried in the war".
What he actually means is "That's the SAME TYPE of weapon I carried in the war".
I once sat at a big gun show and watched as a man almost started a fist fight over an M1 carbine.
He wasn't trying to sell it, he just wanted to be told more about it. It was the carbine his father had carried ashore at D-Day.
He showed it to a carbine seller and was given an opinion.
He got very angry and was told to take it several tables over where a nationally known carbine expert was set up.
The genuine expert gave his opinion and the man almost got violent, accusing the people at the show of trying to steal his prized carbine.
This in spite of the fact he wasn't trying to sell it and no one even offered to buy it.
Security had to escort him out, loudly accusing the show of being thieves.
The D-Day carbine his father carried..... a 1960's Universal.