Cold incoming water is about 5% air. As water heats, air entrapped in the water expands to rising bubbles. The bubbles settle in high places. So long as they are tolerable, they do no harm. Piping the water heater to trap air at the top loop while using an automatic air vent can reduce or eliminate the annoyance.