A friend of mine purchased a new carpet and it was installed fresh out of the package. The odor coming from the carpet was so bad, it created a problem for about three weeks after the installation.
What he encountered is called 'off gassing'. The 'new smell' could be coming from the chemicals contained within the product and breathing them is not necessarily healthy. Any long time health risk is not known, but why not avoild possible health problems, at worse or an unpleasant experience, at best.
Some people feel nauseous, get headaches, or become dizzy around products that are off gassing. Off gassing might be detectable by smell, though sometimes there is no odor. Both old and new carpets can be off gassing long after the initial smell is gone. New carpets aren't necessarily the worse offenders. They might even rate better for air quality compared to older carpets that were made when industry standards were different.
Most carpets are made from petroleum or oil based materials like nylon, polypropylene and polyester and are woven onto a synthetic backing. Fire retardants containing other chemicals are also placed on carpets. On top of that there is the padding which can also cause off gassing, along with the adhesive used to glue it down. All of these sources might create a problem.
Do some homework before purchasing new carpet. Hemp and wool, which are natural fibers, might be a better alternative choice, although the price for these might be higher and they have different challenges as far as cleaning and maintaining are concerned.
MY STRONG RECOMMENDATION:
If you purchase a product that might cause off gassing, you might ask that the carpet be removed from it's packaging and laid out in the warehouse for several days before it is brought to your house and installed. That way the carpet will get to air out before being tacked down. Make this a part of the purchase agreement.