Is this risky? Not at all. Will it give you a huge return? Maybe over 50 years, but not in the short term.
But it's better than leaving it in a savings account.
The one time that I decided not to contribute to my 401(k) was when I had just graduated and still had some credit card debt and my salary was low(so the value of the company match was minimal). Getting rid of the debt was more important to me than saving a little for 40 years in the future. Arguably, this was still a bad idea, but mentally, not being in debt was important to me at the time.