I'm a grain farmer and have grown a lot of malting barley over the years. Grain often sits in storage on the farm for months, sometimes more than a year, before being sold. Then, it spends weeks, or months, in storage and transit, before ending up at a processing plant. After processing, it may spend more months in the pipeline before ending up at a distributor or retailer.
The "fresh" malt that you order online, or pick up at the LHBS, could be at least two years old. Maybe closer to three if it came from a farm that didn't have to turn all of its produce into cash right away.
The kilning stage of the malting process removes virtually all of the moisture from the grain. This improves the shelf life, as keeping grain dry is key to preserving quality during storage.
Whole grain, malted or unmalted, will stay in condition for years if kept cool, dry, and free of rodents and insects.