To a certain degree, Stranger in a Strange Land is also the outgrowth of a bet between RAH and L. Ron Hubbard. They were having dinner, along with Jerry Pournelle, and the idea came up that you could make A LOT of money by founding a religion. RAH and LRH placed a bet on who would be more successful at doing so. RAH wrote SIASL, while Hubbard went on to found the Church of Scientology.
Most people agree that LRH won the bet.