A primary standard must be pure, dry, and stable, and it must have the desired chemical property. Solid NaOH always contains some sodium carbonate and some water.
Additionally, it absorbs more water from the atmosphere. HCl is a gas that is difficult to work with, so it is usually sold as an aqueous solution of approximately 37% (w/w).
This solution fumes dramatically when opened, so it does not maintain a known concentration.