同志 was the standard way to address people in mainland China during the Mao era. Today it is mainly used in political/military contexts. In Taiwan and online, 同志 also means gay — context matters.
memory
同 (same) + 志 (aspiration) = people with the same goals/ideals, i.e., comrades.