Side effect and recursion
Recursion is orthogonal to side effects.

You can have a recursive function with side effects, or without.  You can also have a non-recursive function with side effects, or without.  It's a matter of opinion and taste whether it's better to avoid side effects in any particular situation.  As far as I know, there is no scientific evidence to support a claim that "you should always avoid side effects in any recursive function".

There are reasons to be wary of side effects.  They make programs more complex to reason about.  This doesn't mean you should never use side effects, but they have tradeoffs.  Perhaps one could argue that recursive functions are especially tricky to code and thus one should be especially wary of recursive functions with side effects -- personally, I don't know that I'm particularly persuaded by it.  Ultimately, I think it's a matter of taste and judgement, and it's unlikely that any "one-size-fits-all" rule will be scientifically justified.