The ספר התודעה, also known as “The book of our heritage,” gives explanations to various Jewish customs.
There are two reasons given for the custom of blowing the Shofar during the month of Elul. The first is that the Shofar arouses trepidation. It is to arouse us to do Teshuva. It is to “awaken us from our slumber” and return to Hashem.
The second reason for Shofar originated in the desert. Moshe went up again to הר סיני to receive the second לוחות. He went up on Rosh Chodesh Elul and came down on Yom Kippur.
The Shofar was sounded on Rosh Chodesh Elul to announce to the people that Moshe ascended the mountain. They were being careful to avoid another miscalculation of the forty days which led to disaster with the sin of the Golden Calf.