Whenever people talk "purity" it raises the hackles on my hackles, for the simple fact that most of the time they're talking about doing more harm than good.
See racial purity, where apparently people are unaware of the damage a narrow gene pool does, such as with the inhumane practice of purebred dogs. Or the continued woes Sweden is having with genetic disorders thanks to their eugenic practices that they spent 50+ years enforcing.
Function "purity" is much the same type of pedantic, iron fisted nonsense that reeks more of a naïve and unrealistic ideal that's devoid of rational thought. Akin to the "use strict" idiocy regarding "with" it reeks of the same "I'm too stupid to use it, so nobody else should be allowed to" rubbish.
Hence the use of the scare-words "side effect" to misuse a term in the quest to label something completely normal as some sort of evil. Inward scoping isn't the end of the world, and certainly not a hill worth dying on.
That "functional programmers" lose their blasted minds over it likely being an indicator of why many of them hate objects. Objects of course having properties that are scoped to its methods, a violation of "function purity".
Your "distinction" between a function and procedure being utter nonsense. A function returns a value, doesn't matter from where, sometimes it does so without any input parameters. A procedure doesn't return a value, any value. That's it. That's the difference.
And the end result? People slopping in endless pointless "functions for nothing" where the "re-usability" is so all-important you're willing to sacrifice speed, efficiency, and code-size on that altar. That's stupid, arbitrary, and utterly nonsensical.
Hence why most “functional programmers” seem to use two to ten times the code needed to do the job, that executes 5 to twenty times slower, and then pat each-other on the back over how “modern” and “efficient” they are. Just like the know-nothings with idiocy like front-end frameworks, off the shelf solutions, and all the other hot and trendy BS that makes everyone work harder than need be producing more code than need be. No matter how many marketing dirtbags and predatory scammers throw around words like “easier” or “simpler”.