You don't do away with them, you differentiate between side effectful functions and pure functions. One way to do this is tag them with the type IO. This would be a great pain if there weren't helpful ways (see Monad, Functor, and Applicative) to apply pure functions to them.
You also get the benefit that those side effects have a set of laws to govern their behavior in failure cases.
You also get the benefit that those side effects have a set of laws to govern their behavior in failure cases.