There are several motivations to write and publish, and being read (by the widest possible audience) is only one of them. Even if we put the most mundane reasons (publish or perish, publish to make money) aside, there is at least writing (and publishing) for the purely selfish reason of recording your ideas and, by doing so, making them more permanent and more real, as it were. I remember, during my academically active years, I never cared in the slightest whether anyone was going to read my papers or my book. If anyone was interested in my subject and were curious enough to discover them, they were most welcome to them; but it was entirely immaterial to me whether anyone actually did. This doesn’t mean I didn’t put any effort into writing those texts; quite the contrary. But writing them was a goal in itself; it was never a means to anything for which it would require wide audience.
I can’t imagine this attitude is unique.