In ancient times, when the only source of meat protein came from turkeys, Mexicans turned to beans for both variety and to provide other proteins. As a result, the bean was a staple of the Mexican diet long before the Spanish arrived. And they continue to be popular today.
Most of us associate either black beans or the pinkish pinto beans with Mexican cooking. However, there are more than twenty different varieties of beans that are commonly used in Mexican dishes. A Mexican kitchen has as many different types of beans as the Italian kitchen has pasta shapes.
There is no one right bean for any recipe. In the countryside, the Mexican cook will have her own garden and plant the varieties her family likes. In the city, people will buy what they like or what the grocery store has in stock that day.
However, the various beans do taste different, so it's worth experimenting. The milk lima bean, for example, will give a totally different flavor to a refried bean dish than the heartier black bean. In the end, though, if you like it, that's all that counts.
No one really knows why the Mexicans started creating refried beans. Perhaps it was a way to make a quick dish out of their staple food. They could prepare the beans days and even weeks beforehand, then just recook them as needed.
Chances are you will want to make your refried beans fresh. Resist the urge to serve them right out of the pot though. Letting them sit in the refrigerator for a day or two before mashing them with spices and reheating them lets the true flavor of the beans emerge.