A soffritto is the Italian cousin of the French mirepoix. Both consist of small cubes of root vegetables and onions.
The gentle “sweating” in fat enhances the sweetness of the vegetables and brings out the “umami”, an almost meaty flavor. In the onions it also breaks down the sharp pungency. The process will form a flavor base that brings a certain “...
Purple beans just have slightly different pigments in them, and the purple actually goes away when you cook them.
There's nothing particular about that pigment that would cause your soup to go bad. While it's possible that the beans, or some other ingredient, caused it to go bad, it's not the color, itself, at fault.
The "foaming" and sour taste you ...
I use to add old parmigiano crusts (cleaned with a brush) and/or a 10cm cube of prosciutto, just before the soup starts to boil.
The parmesan left on the crust will melt and blend to the soup, while the crusts will become tender and flavory.
The fat in the prosciutto will melt blend to the soup too, while the prosciutto block will cook in a delicious way.
To my bitter lettuce soup I added lots of carrots, some sugar, some honey, extra peas, instant mashed potatoes, cannolini beans, some mini pastas and some apples. After all of that the soup is now tasty.