Preheat the oven to 375°F. Spray a 9- x 13-inch baking dish with cooking spray. Combine the beans, ketchup, barbecue sauce, sugar, Worcestershire sauce, and mustard in the prepared baking dish. Set aside.
In a large skillet, cook the bacon over medium heat until just crisp, about 6 minutes. Remove the bacon with a slotted spoon to a paper towel-lined plate. Keep 1 tablespoon of bacon fat in the skillet.
Add the ground beef to the skillet and cook for 4 minutes, breaking it up with a wooden spoon. Add the onions and peppers, and continue cooking until the beef is cooked through and the onions are soft, 4 to 6 minutes. Drain any excess liquid from the mixture, if needed. Stir in the garlic and cook for 1 additional minute. Season to taste with salt and pepper. Transfer the beef mixture to the baking dish and stir to combine well. Sprinkle the bacon over the top.
Cover the dish with foil or an oven-safe lid and bake for 30 minutes. Remove the foil or lid and continue to bake until the mixture thickens slightly, another 10 minutes. Let rest for 10 minutes before serving.
