Go through beans and pick out any with holes or rocks. Transfer beans to a large container and cover with several inches of cool water; let soak for at least 1 hour, or overnight.
Rinse beans and dump water out. Transfer to a large pan and cover with fresh water by 2 inches. Add garlic and bay leaf and bring to a boil. Reduce to a simmer and cook until tender, about 1 hour, adding oregano and salt during the last few minutes. Reserve a few spoons of "caldo" (cooking juice) as it cooks.
Measure 1/2 cup cooked beans for gallo pinto and reserve remaining beans for another use.
For one serving of gallo pinto: Heat oil in a skillet over medium-low heat. Add onion and saute until dark but not burned, 8 to 10 minutes. Add 1/2 cup cooked black beans along with 2 to 3 tablespoons "caldo." Stir in rice and cook until it starts to get crispy 3 to 5 minutes.