In the web frontend development context, we should care about function's side effect not only for simplicity of the function's responsibility, but also for preventing unnecessary/dangerous code from leaking into client side.
This slides show why we should care about side effect in frontend development, and introduce treeche, which is the tool to detect side effect in the ESModule