If institutions are fragile, it could be preferable to keep your money under the mattress. For example, in developing countries banks tend to charge ridiculous fees for "managing your account" unless you keep a minimum amount of money in it (I am thinking of Mexico 10 years ago). Thus for the low and middle class, it was better to store their money outside of the banking system. Even though they might lose value due to inflation and is less safe, the banks usually give no interest on deposit accounts anyway, and may even charge fees for no good reason.
The second scenario that I can think of is not exactly to save it under the mattress, but it is also very common, especially in countries where financial inclusion is very low (usually because it is expensive to have an account), people come up with ways to save money among themselves, for example using a Rosca (a rotating savings and credit association).
Lastly, when using the banking system implies huge transaction costs. This is obvious for people that engage in illegal activities, they have tons of cash in their hands, but they can only deposit them in smaller batches using tons of people in order to not be detected. This makes them leave a lot of it in cash. Probably they don't leave it under the mattress, because it would not fit, but let's say under a house. These kinds of restrictions end up affecting also people that earn money legally, but the nature of their business is in cash and face the same transaction costs. Then, it can be more cost-efficient to keep some money out if the banking system.
Hope this helps. I'm also not sure a bank run is a good example, but for sure if there is the one I would run to take my money out of the bank. It is better to gamble and have the money in my hands (even if there is a chance it will lose its value) than having it in the bank and still lose it if the currency loses its value, or not being able to use my money if it still has value.