You can boil it down to two things: 1) they deliver lots of energy in a small package, and 2) they keep indefinitely. The reason for that is simple: they’re inhospitable environments for microbes. As anyone who’s ever attended a food safety class knows, microorganisms require several things in order to grow and multiply. Among them, proper pH, food, the right temperature and time. A cracker sitting in a box offers pretty much all those things. What it doesn’t offer is the most critical element of all of them: water. Historically the most successful crackers have been those from which every last vestige of water has been removed — typically via lengthy, low-heat baking…once, twice even three times. Once moisture has been brought to such devastatingly low levels, crackers can be stored for decades. In fact there are stories about sealed barrels of uneaten Civil War-era hardtack being distributed to troops during the Spanish American War (which broke out about thirty-five years later). If not sure if that’s actually true, but it’s at least theoretically possible.
Did I mention that it’s only been very recently that crackers have been considered desirable as a food? More on that later.