In the blowing of the shofar on Rosh HaShana there is an allusion, as though saying:
“Awake you sleepers from your sleep, and slumberers arise from your slumbering…
All who forget the truth in the follies of the times and err the whole year in vanity and emptiness that cannot benefit or save, look to your souls, improve your ways.”
The sound of the shofar is not meant to be pleasant to the ear.
Its purpose is to arouse and to shock, to awaken those who slumber in the endless routine of life and guide them towards teshuva.
–Rabbi Adin Steinsaltz