That 'module' idea came out of necessity from a time with older NodeJS versions (missing newer language features) and where subflows did not have parameters.
And example would be
padStart() for strings, one of the first functions I put into a module, as it wasn't available back then. Also, you weren't able to use features like block-scoped variables (
let) or classes outside of strict mode (hence the IIFE block).
Now that subflows are a lot more flexible (and with new features of NodeJS >= 8) my modules are actually shrinking. The rest of my common library stuff is put into NodeJS packages, as you handle it too.
It is still useful for problem-specific functions that are only used in one environment or during prototyping, though.
That is one thing I really admire about Node-RED. You can easily move parts around, try out new stuff, but keep the old things running at the same time. Especially if you have built a distributed system with multiple instances and decoupled your components with some kind of broker like MQTT or WAMP.