I used to have a marine (reef) aquarium. One part of filtration is called a foam fractionator. By blowing fine bubbles in a thin column, you produce a great deal of surface area where air and water touch at an interface. This affects the entire volume of water in the cup so stuff in the water can’t circulate away or avoid the (normal) surface. Thus the effects below are greatly enhanced.
Some molecules — including many proteins, especially cell membranes from leftover food and waste — have spans that are hydrophobic and spans that are nydrophilic on the same molecule. That's bound to happen on any long complex protein.
These will gather at the air/water boundary, which it loves better than being totally under water.
A collection of this stuff on a bubble makes the bubble wall stay, in exactly the same way a soap bubble forms. Soap is in fact a molecule of this type.
Once such boundaries start collecting, lots of other stuff will get swept up in it and stick, as well. In your picture you see sticks and leaves. The same idea occurs on a microscopic scale with tint bits of whatever is floating in the water.
In the aquarium, the cup is raised or lowered until the “head” of foam can spill out, removing it from the water.
The same foam fractionation can certainly occur naturally. A piece that floats around will “snowball” slowly as there is a tiny air/water interface surrounding it. Where there's a turbulent fall of water, it more closly resembles the machine version, forming bubbles which are left to recirculate in a small volume.