In a large bowl soak sauerkraut in cold water to cover 20 minutes, changing water once halfway through soaking.
While sauerkraut is soaking, in a large heavy skillet cook bacon pieces over moderate heat, stirring, until golden.
Pour off all but about 2 tablespoons drippings and add onions to bacon.
Cook mixture, stirring, until onions are softened.
Drain sauerkraut well in a colander, pressing out excess liquid, and in a large flameproof roasting pan combine with bacon mixture, carrots, beer, broth, bay leaves, salt, and peppercorns.
Bring sauerkraut mixture to a boil on top of stove and boil 1 minute.
Cover pan tightly with foil and braise in middle of oven 4 hours.
Sauerkraut may be prepared up to this point 1 day ahead, cooled, uncovered, and chilled, covered with plastic wrap. Reheat sauerkraut before proceeding.
If desired, in a heavy skillet heat oil over moderate heat until hot but not smoking and in batches brown sausages.
Add sausages and pork loin to sauerkraut, partially submerging them.
Braise sausages and sauerkraut, covered tightly with foil, in middle of oven 30 minutes and transfer with a slotted spoon to a heated platter, discarding bay leaves if desired. (Do not eat bay leaves if leaving as garnish.).