Pick over beans to remove rocks, debris, etc. Soak in cold water to cover by 2 inches overnight in a large bowl.
Drain water from beans. Add drained beans, chicken stock, and bay leaves to large pot. Bring to boil, then lower heat to simmer and cook until tender, about 1-2 hours. (Or cook in slow cooker on high for 6 hours or until tender.)
Once the beans are cooked, begin to cook the vegetables. Heat oil in separate large saucepan over medium-high heat. Add onions and ½ teaspoon salt, and sauté for about 5 minutes.
Add the celery and carrots, and continue cooking, stirring often, until softened and just beginning to color, about 5 minutes more.
Add ham and sugar and stir for about 4 minutes.
Add garlic and stir one additional minute.
Stir in tomatoes and bring to boil. Reduce heat to simmer and cook for about 20 minutes.
Add beans with their cooking liquid to the vegetable mixture and cook until thick, stirring occasionally, about 45 minutes.
Remove bay leaves and season with salt and pepper to taste.
Offer lemon wedges with each bowl to squeeze in before eating. If desired, drizzle each bowl with a bit of extra virgin olive oil before serving.