I like the theory that 42 was chosen because ASCII 42 is *, as in the wildcard character. It matches everything!
> > The answer to this is very simple. It was a joke. It had to be a number, an ordinary, smallish number, and I chose that one. Binary representations, base thirteen, Tibetan monks are all complete nonsense. I sat at my desk, stared into the garden and thought '42 will do' I typed it out. End of story.
https://en.wikipedia.org/wiki/Phrases_from_The_Hitchhiker's_...?
TVTROPES WARNING!