For centuries spices were transported on the backs of camels or in the holds of slow-moving sailing ships, their schedule dictated by the trade winds crossing the Indian Ocean and the Persian Gulf. Because of this need for long storage, they're typically sold in long-lasting dried form. That holds true even for New World spices, such as dried chilies and chili powder mixtures. Their shelf life is good, but they will eventually lose their pungency.
Chilies vs. Chili Powder
Some cooks, especially in regions of the country where chilies aren't traditionally used, confuse dried chilies and chili powder. Dried chilies are whole peppers, packaged intact, crushed into flakes or ground to a powder. Some varieties add a clean and uncomplicated heat, while others add distinctive earthy, fruity and smoky flavors. This grouping includes hot and sweet paprika, as well as individual ground chilies such as anchos -- dried poblano peppers -- or chipotles. Chili powders are rather different. They're intended as a one-step seasoning for making a pot of chili. They include varying combinations of individual chili powders, along with onion powder, oregano and other flavorings.
Expiration vs. Shelf Life
Many packaged spices are sold with an expiration date on the bag or jar. Unlike meats and other potentially hazardous foods, spices don't become a danger to diners after that date. It's a freshness date, intended to provide cooks with a reliable guide to the quality of the spice. After that time the volatile compounds that give the chili its heat and flavor will begin to deteriorate, evaporating and oxidizing. The oxidation process, in turn, can create rancid or unpleasant flavors.
The shelf life of dry chilies isn't purely a function of time. The spice racks many cooks keep on their countertop or wall, or even above the range, are about the worst environment possible for any spice. Dry chilies kept tightly sealed in airtight jars, in a cool and dark place, will last much longer than chili powder in a glass jar beside the stove. Like other spices, dry ground chilies and chili powder are best within six months of the purchase date. Whole chilies and chili flakes are more durable, retaining good flavors for up to a year if properly stored.
Spices aren't especially expensive in the modern world, so it's not a burden to keep yours fresh. Buy them in small quantities, especially if it's a spice you seldom use. It's best to buy those from the bin at a busy bulk food store, where you can purchase just a tablespoon or two to keep in your pantry in a small jar. Use tiny stick-on labels to date repackaged or bulk-store spices, so you know when to replace them. If your dry chilies have begun to fade, toast them gently in a dry skillet for a few minutes before using them. This will freshen them and minimize any stale flavors. Increase the amounts slightly as well, to compensate for the lost flavor and heat.