This foam is called soup scum, and according to Bon Appétit, it forms on top of meat broths because of "rogue proteins that coagulate when heated." These proteins are leached out of meat, bones, and vegetables by heat, and once they're out in the open, they become viscous and form bubbles, creating foam.