In imperative programming, we say exactly what we want to happen. Each step changes the state.
With functional programming, we write functions to be called. These functions should not depend on the state, outside of local variables.
If we remove side effects from all functions then functional programming has no global variables which could affect the output.