Probably of onomatopoeic origin.
Practice speaking and memorizing "beffa" and many other words and sentences in Italian.