Why Do Spittlebugs Make Bubbles?
The New York Times, Tiny Fox Lab

Spittlebugs feed on plant sap and then excrete bubbly foam to create a protective fortress around themselves. Later, they emerge as adult froghoppers.Tiny Fox Lab Facts

Preview photo credit: The New York Times
Source: https://www.nytimes.com/video/science/100000006346172/how-the-spittlebug-builds-its-bubbly-fortress.html