In old China 社 was a local god's altar. Every few days the locals would gather there to worship & discuss the issues of the day. Eventually "altar meeting" 社会 came to refer to the people who gathered there (i.e., the community) & nowadays the meaning has been further extended to cover society as a whole. So today's term for “socialism” 社会主义 is literally “the church meetings doctrine”. Karl Marx must be spinning in his grave. See https://www.chinese-stories-english.com/ol--time-religion.html
Ol' Time Religion

James Mahler