Commodities are an asset class of their own because, unlike other asset classes, commodities are not productive capital. For a long-term investment, it may make sense to include a small portion in the portfolio. Since commodities have a low to negative correlation with stocks and bonds, i.e. their development is largely independent of each other, they are recommended as an effective instrument for diversification.
More information on commodities as an asset class can be found here.