Communism was a convenient excuse -- the real issues appear to be more class- and ethnically-based. There's a lot of backstory, including racial tensions and Indonesia's colonial history.
Wiki offers the following discussion on Chinese Indonesians. As always, there were a lot of reasons, not least of which was that the Chinese were fairly dominant in the Indonesian economy.
The Chinese did suffer disproportionately under the anti-Communist purges but unfortunately they were disproportionately represented in the Communist party, as they were in Malaya a decade earlier. It was very foolish for such an industrious hardworking people to get invoved with such an ideology but perhaps they thought in a Communist society aligned with China they might get a fairer deal. Sad that as usual they became the scapegoats for legitimate anger as they were in 1998, the Chinese are the Jews of SE Asia. I am glad to say their position is much better nowadays and hopefully that will continue.
It wasn’t only the Chinese who were victims however, by the time Suharto came to power there was a nascent multi-sided civil war already raging in central and east Java and in Bali. Chinese, Balinese, Madurese, Javanese, Christian, Hindu, Muslim, rural, urban, Communist, Islamist etc they were all at each other’s throats due to Sukarno’s misrule.
Suharto and the Army exploited this chaos and united the disparate groups to fight the Communists, it was an awful time but once order was restored Indonesia had a much more peaceful and prosperous future compared to the nightmare a Communist takeover would have been.