Cook the beans. First drain out the soaking water and then add enough water to cover the beans by two inches. Add the bay leaves and bring the beans to a boil. Lower the heat to a simmer, cover the pot, and let the beans cook until tender, about 40 minutes. Check during cooking to make sure the water hasn't dried out.
Preheat the oven to 325 degrees.
In a Dutch oven, a 10-inch cast-iron skillet, or in a baking dish that can go from stovetop to the oven, heat the oil. Add the onions and garlic with a pinch of salt and the sugar.
Cook the onions over medium heat, stirring frequently, until they are caramelized and turn soft and brown. Add the beans, sage, and lavender.
Reserve the bean cooking liquid, if any, and add to it the molasses, barbecue sauce, and mustard. Stir well to mix. You need about two cups of liquid. If you don't have enough bean water, add to it plain water or, better still, vegetable stock, to get two cups.
Stir the liquid into the beans and bring to a boil. Add salt and ground black pepper to taste.
Turn off the heat and transfer the baking dish or skillet or Dutch oven into the preheated oven. Bake the beans, uncovered, for three hours. Check a couple of times to make sure the liquid has not all evaporated, and if it has, stir in some more liquid. You can also add liquid at the end. Your beans should be a little soupy.
Once the beans have baked, check for seasoning and add more salt and ground black pepper if needed. Serve warm or at room temperature.