It all depends. I write stuff that I know I’ll never publish — stuff that is me working out private specific stuff about my life and the people in it. It helps in the same way I mention in the piece.
I also write stuff like this, about general ideas, concepts, and things. That stuff I like to publish because I think it can help other people think through the bigger stuff as well.
I think both types of writing are valuable in their own right.