Bubbles are not just pretty. They're surprisingly educational too!
Following the path of bubbles with their eyes teaches babies tracking and scanning. This is a skill babies wlll use throughout their lives. Babies learn when to move their eyes and when they must move their heads developing their neck muscles.
Later babies will practice gross motor skills, learning to chase bubbles by reaching then crawling, walking, and then climbing.
Babies are learning first hand, by observation, about cause and effect; this is a crucial STEM concept and basic principle for understanding the world around them.