Keynes was a member of the Bloomsbury Group which was "an influential group of associated English writers, intellectuals, philosophers and artists, the best known members of which included Virginia Woolf, John Maynard Keynes, E. M. Forster and Lytton Strachey. This loose collective of friends and relatives lived, worked or studied together near Bloomsbury, London, during the first half of the 20th century. According to Ian Ousby, "although its members denied being a group in any formal sense, they were united by an abiding belief in the importance of the arts". Their works and outlook deeply influenced literature, aesthetics, criticism, and economics as well as modern attitudes towards feminism, pacifism, and sexuality." (Wikipedia)
Later in life Keynes himself is on record as criticising the Group:
"on the eve of war Keynes gave a "nostalgic and disillusioned account of the pure sweet air of G. E. Moore, that belief in undisturbed individualism, that Utopianism based on a belief in human reasonableness and decency, that refusal to accept the idea of civilisation as 'a thin and precarious crust' ... Keynes's fond, elegiac repudiation of his "early beliefs", in the light of current affairs ("We completely misunderstood human nature, including our own")". (ibid.)
There can be no doubt that the beliefs Keynes held influenced his economic thinking. He was a brilliant theorist and at the same time a hedonist who valued pleasure in all aspects of life as a paramount good. When his economic theories were criticised on the ground that they would bring about economic disaster "in the long run" he is reported to have replied "... in the long run we are all dead".
The question of how one's deeply held convictions affect one's intellectual theories is a perennial one. It is the underlying presupposition that indeed they do that gives rise to the attacks on the personal habits of anyone proposing or disseminating ideas in any field. One only need recall the personal attacks on Ron Paul in an effort to undermine his credibility to see this tendency in action. However, the early moral philosophy embraced by the Bloomsbury Group was that proposed by G.M. Moore who believed that "intrinsic worth" can be distinguished from "instrumental value".
"Moore's differentiation between intrinsic and instrumental value allowed the Bloomsburies to maintain an ethical high-ground based on intrinsic merit, independent of, and without reference to, the consequences of their actions. For Moore, intrinsic value depended on an indeterminable intuition of good and a concept of complex states of mind whose worth as a whole was not proportionate to the sum of its parts." (ibid.)
This then provided the Group with a moral justification for their controversial sexual behaviour and relationships. Whether they were indeed justified in such a view is open to question. Keynes himself seems to have departed from it later in his life.
"Jesus answered them: 'Truly, truly, I say to you, everyone who commits sin is a slave to sin. The slave does not remain in the house forever; the son remains forever. So if the Son sets you free, you will be free indeed.'" (John 8:34-36)