In Star Wars: The Old Republic, this is addressed: during the time of the Infinite Empire, a living machine called the "Mother Machine" (or a series of them) were created by the quasi-humanoid Rakatan. They had found a species of proto-humans which they were experimenting on with the "Mother Machine".
These proto-humans were found very valuable because they had a latent (albeit slight) capacity for connecting to the Force. The Rakatans at the time were under threat of losing their own connection to the Force due to a rapidly spreading plague that severed their ties to it. In an attempt to find out how to reverse it, they created dozens of mutated versions of these humanoids, of which we are shown at least the Ratatakki, Chiss, Twilek, Zabrak, and Esh-Ka (the most alien and aggressive of their creations shown).
As a by-product, they put many of these species to work in their slave colonies as they terraformed the galaxy that they were able to travel to (they could only jump from places strong in the Force because that's how their hyperdrive technology worked). There one can presume they terraformed in ways conducive to other humanoid life to form, which they would then enslave and put to work making their living technology (that may have even further guided their evolution).
TL;DR Rakatans had a big hand in shaping the galaxy's species - before their interactions they were really the only major humanoid species - the other major species were a cephalopod-like race called the Gree, a saurian race called the Kwi, and an insect-like race called the Killik.
Enjoy your mighty hammer responsibly "
– ThePopMachine Sep 19 '15 at 21:47