Eru himself only really created three sentient races1: Elves, Men, and the Ainur (the Valar and Maiar); Elves and Men are called the Children of Ilúvatar (and considered rather special) for exactly that reason. Why he felt the need to do this is unknown, but I for one am rather glad that he did.
The other sentient creatures came about for other reasons:
- Hobbits are a subspecies of men:
It is plain indeed that in spite of later estrangement Hobbits are relatives of [Men]: far nearer to us than Elves, or even than Dwarves. Of old they spoke the languages of Men, after their own fashion, and liked and disliked much the same things as Men did. But what exactly our relationship is can no longer be discovered.
Fellowship of the Ring Prologue I: "Concerning Hobbits"
Presumably they evolved naturally, but as Tolkien says in the Prologue it's not exactly known.
Dwarves were created by the Vala Aulë because he was anxious for the Children to arrive, and wanted to hasten the process
Ents were created by the Vala Yavanna, to protect the plants which otherwise can't defend themselves from harm:
Would that the trees might speak on behalf of all things that have roots, and punish those that wrong them!
The Silmarillion III Quenta Silmarillion Chapter 2: "Of Aulë and Yavanna"
- Eagles were created by the Vala Manwë, for reasons unknown:
[B]efore the Children awake there shall go forth with wings like the wind the Eagles of the Lords of the West.
The Silmarillion III Quenta Silmarillion Chapter 2: "Of Aulë and Yavanna"
The Eagles act principally as Manwë's eyes in Middle-earth (similar to Odin's ravens from Norse mythology), so it's possible that was his only impetus for creating them. But we don't know for sure.
Orcs were created...somehow, but probably not intentionally by Eru
Dragons were created by Morgoth, somehow
Ditto with Trolls (of various types)
The Giant Spiders (such as Shelob and the spiders Bilbo encounters in Mirkwood) are descendants of Ungoliant, whose origin is similarly unclear
Tom Bombadil sprung fully-formed from the collective frustrations of a million Tolkien fans trying to fit every creature into neat little boxes
The closest thing to a motivation we get from The Man himself comes from Ainulindalë, when he introduces the Music of the Ainur (emphasis mine):
Then Ilúvatar said to them: 'Of the theme that I have declared to you, I will now that ye make in harmony together a Great Music. And since I have kindled you with the Flame Imperishable, ye shall show forth your powers in adorning this theme, each with his own thoughts and devices, if he will. But I will sit and hearken, and be glad that through you great beauty has been wakened into song.'
The Silmarillion I Ainulindalë
1 Elves and Men are the same species, from a biological perspective, and the differences between them are primarily spiritual