Complex systems are characterized by an abundance of meta-stable states. To describe such systems statistically, one must understand how states are sampled, a difficult task in general when thermal equilibrium does not apply. This problem arises in various fields of science, and here I will focus on a simple example, sand. Sand can flow until one jammed configuration (among the exponentially many possible ones) is reached. I will argue that at least in popular simplified models of granular materials, these dynamically-accessible configurations are atypical, implying that in its solid phase the material "remembers" that it was flowing just before it jammed. As a consequence, it is stable, but barely so. I will argue that this marginal stability offers a new perspective on long-standing questions both on the solid and liquid phase of granular materials, in particular on dense suspension flows near jamming.