Soak the beans with the baking soda in 10 cups of water for about 3 hours. Rinse and drain.
Add the beans to a Dutch oven and add 10 cups fresh water, along with the olive oil, cumin, oregano, sugar, vinegar, cilantro stems, bay leaves and onion. Simmer until the beans are soft, about 2 hours. Add 2 teaspoons of salt (or more to taste) and freshly ground black pepper to taste.