From the point of view of Buddhadharma, cursing the Buddha is one of the five worst kinds of karma. These masters should have been in big trouble, but these stories are in the same vein as that of Bodhidharma and the Emperor. They are meant to shock the practitioners into awakening, and are usually spoken to someone very close to realization. In Ch'an these statements are sometimes called "turning words." Ch'an masters use such methods to break up people's attachments. Ch'an masters are not being arrogant. They make these statements to help practitioners. The Ch'an masters who made these comments would likely have been seen prostrating to a Buddha statue later on. People who hear the masters' words and later witness their actions would probably think the masters were hypocritical or insane. But in fact it is simply the masters' way to help sentient beings transcend discriminations such as self and other, nirvana and samsara, Buddhas and ordinary sentient beings. They try to shatter a person's reliance on polarities and relativity.
On one retreat a long while ago in Taiwan, someone asked me if he could recite the Buddha's name as a method instead of counting breaths. I asked, "Which Buddha?"
"Amitabha Buddha."
"Here we don't have Amitabha Buddha, so you can't recite his name, " I replied.
The person returned to his cushion, looked around and noticed a statue of Amitabha Buddha.
He returned and said, "How come you said that? There's a statue right over there."
"I didn't put that statue there, " I said. "My master did."
Later on the practitioner saw me prostrating to that very statue, so he asked, "How come you can prostrate to Amitabha?"
I said, "If my master prostrated to Amitabha, how dare I not do the same? All the same, you can't recite Amitabha Buddha's name."
But the person was persistent and said, "Shih-fu, I'd really like to use that method because I don't feel there is any virtue or merit in just counting breaths."
Eventually I let him do what he wanted to do, and it was from that point onward that I allowed people to use the method of reciting the Buddha's name.