The sponsoring by friends on the name of friendship is not a valid reason. You don't need to stay 6 months and renew it to visit (that's the meaning of kunjungan in Bahasa Indonesia) a friend. I don't know of any western country who would not raise an eyebrow and wonder how the person is financing his stay if o,e would be staying in the country without known sources of income.
A girl friend? Same. Girlfriend is not a legal status in Indonesian law and has no more value than a friend. After a couple of months, Imigrasi would (or at least should) start to raise concerns if they would be following the guidelines given to them by DitJenIm.
A wife would be a very different ground and possibly the only one allowing a perpetual extension of visa sosbud and izin perpenjangan.
I've been staying a few years with sosbud and got the "we suspect that what you are doing is illegal work" bit followed by various monetary requests. Many times I've been pressured and threatened not to have my extensions. I refused to pay and via my sponsor (who was my wife) told them that we were understanding that it was their right to check on me and to refuse an extension, but that if they would, then we would ask them to issue a surat penolakan as per the procedure, listing the reason why I was refused an extension. In most cases it was enough to have them rethink this illegal work accusation and extension refusal.
However, twice they have tried their luck. In both cases I complained to the Kanwil and got the things straight pretty quickly. The first time, a silly kepala seksi Pengawasan Orang Asing stamped my passport giving me three (or seven?) days to leave. It was the day my son born and I was refusing to pay him a kulkas or an ac has he subtly suggested. As soon as I got my passport back I went straight to see the kepala divisi keimigrasian in my kanwil, asked for an interview with him and exposed him the situation. I was very upset due to the fact that I had to waste some of my time while my wife was at the hospital having given birth in the early morning. I detailed the whole story without omitting to mention the subtle mention of the fridge and/or ac. It didn't take long for the Kadiv to understand and act. He asked me to go back home, to go to the immigration the day after and that everything would be clarified by then. The day after, when I entered the KanIm I could feel that a storm happened. Someone briefly show me the stairs to go up to the POA section. The kepala seksi pengawasan orang asing was there, waiting for me. He kept on apologizing and asking me what exactly I said to the Kadiv. He quicly canceled the stamp, ask me to go back home and that someone would bring my passport home with the requested extension. In the afternoon, it was done.
The second time, a kepala seksi statuskim, removed documents in my file. These documents were proving that I had enough money on my indonesian bank accounts to live for a period far longer than the extension I was applying for and were showing that my wife was the DirUt of her own company. Nevertheless, he wrote and signed a letter for the kanwil (it was my third extension, requiring the kanwil approval) stipulating that they had no clue on how I was living in Indonesia, that they were not aware of any job for my wife and that they were suspecting illegal working. It was smarter that the first attempt because by doing so, they were switching the responsibility of the refusal to the Kanwil. By reading the letter, the Kanwil would have without doubt issued a refusal. The surat penolakan issued by Imigrasi would have just mentioned "because KanWil refused", covering KanIm's ass. What was not smart was to make me the kurir for the letter in between KanIm and KanWil. When they gave me the letter in the envelop, I opened it on the way to the kanwil, read it and obviously understood that the kepala statuskim was trying to screw me. I went back home, opened my computer and answered point by point to the concerns raised in the letter. I put back the KanIm letter in its envelop, stapled it as it was initially and went to the Kanwil giving the two letters and asking for an interview with the kadiv. I explained him that I had in good authority that some documents were missing in my file, without telling him how I knew it, and that I therefore answered to possible concern Kanwil may have. He read both letters and check the documents I gave him. He didn't comment on it and asked me to go back home.
The day after Kanwil was issuing a positive letter of recommendation, leaving no choice to the kepala statuskim than to confirm my extension.
After this last episode, I never had any trouble to get my extensions and I have always monitored the content of any letter giving to me to bring to the Kanwil.
It is only years after that I understood why Imigrasi was acting like that nastily with me. They were encouraged by "someone with influence" who would have enjoyed to see me deported and made multiple reports over the years against me. The situation has since then been clarified and the people who was feeding them with false accusations have been publicly and legally exposed.
Many times you will have immigration officer telling you that they won't issue you an extension if you don't comply with the bribe culture. Sometimes they just try their luck but more often than you may think of, they act upon denunciation. Unfortunately it is not rare that an indonesian (or a fellow expat) comes to the KanIm to report any alleged wrongdoings by a foreigner. Sometimes it is true, sometimes it is baseless, but ALL THE TIME it is a really good ground for immigration to give you trouble.
UU 6/2011 has given them much more power to refuse an extension, but they still need to prove that you are breaching in a significant manner your permit. In the example you give, I am afraid that if the guy was delivering regularly the friday sermon, and no proofs of a regular legal income, they had a ground to suspect illegal work and refuse an extension, especially if the sponsor was just a friend and not an indonesian wife. If the sponsor would have been a yayasan or any religious entity then they would also have been totally right to refuse an extension (see my above post concerning the LSM in Manado).
But here again, to have the EXACT reason why it happened, it would require to know much more details than what you shared with us.
... and by the way, WELCOME BACK. There was some time you've not been around and it's always nice to see people being back posting.