Place the beans in a large pan. Cover with 3 quarts cold water and add the bay leaves. Bring to a boil, then reduce to a simmer. Cook the beans for 3 hours, stirring frequently and adding more water as necessary to keep the beans covered at all times.
Heat the oil in a large skillet. Add the onions and sauté over medium-high heat until translucent, about 15 minutes. Add the garlic, cumin, and dried and fresh oregano and sauté for 2 more minutes. Remove from the heat and cool slightly. Transfer the onion mixture to a blender and puree until smooth. Set aside.
When the beans are almost tender, add the onion puree, sugar, and salt, and continue cooking until just tender, 30 minutes. Taste and adjust seasonings.
Ladle the hot soup into bowls and garnish with sour cream.