Why this matters
Uncontrolled goroutines can continue running and leak memory or other resources if the rest of the program moves on (for example, on shutdown or test completion). By managing goroutine lifecycles, you ensure they exit when expected, preventing resource leaks and unpredictable behavior.