The Marring of Arda was intentional
The idea of Arda Marred (as it's commonly referred to) is a direct reflection of the downfall of Man in the bible and the imperfections of the world. Similar to the bible, the history of Arda Marred ends with an apocalyptic event — Dagor Dagorath — after which the People's of Ëa begin living in what is known as Arda Unmarred (or Arda Healed).
Origins of the evils
It is important to know how the world (or Ëa) was created in Tolkien's Legendarium, and the details of that are provided in the Ainulindalë, The Music of the Ainur.
[In the beginning of creation] There was Eru, the One, who in Arda is called Ilúvatar; and he made first the Ainur, the Holy Ones, that were the offspring of his thought, and they were with him before aught else was made.
The Silmarillion, Ainulindalë
But now Ilúvatar sat and hearkened, and for a great while it seemed good to him, for in the music there were no flaws.
ibid.
The Music of the Ainur begins as a perfect harmony, as Eru wished, and would in turn create a perfect world. Within the host of the Ainur, however, was a powerful being named Melkor. He was the most powerful of the Ainur and tried to instil his own thoughts on the Music.
But as the theme progressed, it came into the heart of Melkor to interweave matters of his own imagining that were not in accord with the theme of Ilúvatar; for he sought therein to increase the power and glory of the part assigned to himself. To Melkor among the Ainur had been given the greatest gifts of power and knowledge, and he had a share in all the gifts of his brethren.
ibid.
Throughout the building of the world Melkor continues to corrupt the works of the other Ainur and it continues from his influence on the Music to affect the paths of time.
and [the Valar] built lands and Melkor destroyed them; valleys they delved and Melkor raised them up; mountains they carved and Melkor threw them down; seas they hollowed and Melkor spilled them; and naught might have peace or come to lasting growth, for as surely as the Valar began a labour so would Melkor undo it or corrupt it...
<ibid.>
It is the corruption of Melkor that continues throughout the history of Arda that you comment on being "horrible". However there is some hope.
Arda Healed
In the Silmarillion is mentioned a second Music during which the themes of Ilúvatar shall be played "aright":
... though it has been said that a greater still shall be made before Ilúvatar by the choirs of the Ainur and the Children of Ilúvatar after the end of days. Then the themes of Ilúvatar shall be played aright, and take Being in the moment of their utterance, for all shall then understand fully his intent in their part, “and each shall know the comprehension of each, and Ilúvatar shall give to their thoughts the secret fire, being well pleased.
ibid.
From the suggestions of the Ainulindalë, at the end of days (Dagor Dagorath) there shall be a new music that takes form immediately and reflects the will of Ilúvatar perfectly. A form of Utopia.
Finrod suggests that this third Arda will be the same as Arda Unmarred but greater:
'This then, I propound, was the errand of Men, not the followers, but the heirs and fulfillers of all: to heal the Marring of Arda, already foreshadowed before their devising; and to do more, as agents of the magnificence of Eru: to enlarge the Music and surpass the Vision of the World!'
'For that Arda Healed shall not be Arda Unmarred, but a third thing and a greater, and yet the same.'
Morgoth's Ring
As well as Manwë:
"The second is the Unmarred that shall be: that is, to speak according to time in which they have their being, the Arda Healed, which shall be greater and more fair than the first, because of the Marring: this is the Hope that sustaineth."
ibid.