There's some explanation in Judy Allton's 1994 "Archivist's Notes #3: Lunar Samples Presently Curated Under Helium". First, a definition: An SESC is the vacuum container used to transport from the moon.
A large bolt top container connected to a gas cylinder supply of helium is maintained in the Returned Sample Vault. This container, known as the "bean pot", contains samples from two Special Environment Sample Containers (SESC) collected during Apollo 15 (Apollo 15 returned from the Moon in August, 1971). The SESCs were sealed via an indium/knife-edge seal on the Moon.
The paper then provides the rationale for vacuum transport and nitrogen storage:
RATIONALE for collecting samples in SESC: No precise documentation is yet found. However, the Geochemistry Group Report of the NASA 1965 Summer Conference on Lunar Exploration and Science (NASA SP-88, p. 255) expressed a desire to see a number of smaller metal containers suitable for high vacuum used to return samples under conditions approximating the lunar environment. They desired
containers capable of holding $10^{-12}$ torr.
RATIONALE for opening samples under nitrogen: As early as 1965, the Geochemistry Group Report [cited above] also specifies nitrogen as the most desirable non-reactive gaseous atmosphere in which to open samples because nitrogen would not interfere with noble gas analyses on lunar samples. Subsequently when the LRL was constructed, vacuum was determined to be more preferred by influential individuals because of the unknown nature of lunar samples. When it became evident that 1) vacuum sample handling was not practical, and indeed risky to samples when the vacuum was suddenly degraded, and 2) lunar samples did not react violently with nitrogen, sample handling was then conducted under nitrogen [interviews with Wasserburg, Haskin]. This switch from the vacuum system processing to nitrogen processing occurred just prior to Apollo 14 in December 1970 [LSAPT minutes].
The SP-88 mentioned above is the 421 page report of a large 1965 workshop where a wide range of scientific disciplines discussed the practical details of lunar exploration. There's no consensus outcome that I can see about storage, just a lot of recommendations. It was probably up to those "influential individuals" in the quote above to sort it all out...
NASA uses a number of approaches to storing samples, not just nitrogen.
Allton continues:
15012 and 15013 were taken to University of California Berkeley to be opened in the UCB organic clean room under helium March 31, 1972. At Berkeley the SESCs were opened and from each 5 allocations for nitrogen analysis and several reserve aliquots to be stored by the Curator were prepared.
RATIONALE for opening SESC samples in helium: " ... so that some lunar samples uncontaminated by terrestrial nitrogen will be available for analysis.." Helium was preferred among gases other than nitrogen due to price and easy availability.
But that wasn't done that often:
By the time of Apollo 17, LSAPT decided to open the SESCs in nitrogen since there was no demand for samples opened in helium. [notes on LSAPT minutes attached].
The paper continues with pictures of the sample containers and more documentation.