Onomatopoeia is a figure of speech. Figure of speech is used when someone expresses a word or phrase in a non-literal sense for either a rhetorical effect or a vivid effect. In this particular case, a vivid one.