The Renaissance Nerd explains:
There is a reason for this. The research into Alzheimer's Disease has revealed that repetitive thoughts actually carve chemical pathways into our brains, that harden over time like wheel-ruts in a muddy country road. Those chemical channels through our minds are the result of our own choices, but they are not so easily brushed aside. The easiest way to break them is never to put them there in the first place.
Hence the commandments.
Jesus said, "What manner of men ought ye to be? Even as I Am." This holds a double meaning; we should behave as Jesus did during his earthly sojourn, yes. But I Am is also the name of God; therefore we should be like the man Jesus Christ, but also like the very God of the universe.
Sin cuts grooves into our minds that make us less and less like God, and less and less able to break free of those channels, until evil thoughts become hard-wired. So why does God care about the sexual proclivities of individuals on an obscure planet in an out-of-the-way corner of a fairly small galaxy? It is because He cares about those individuals. He doesn't want us to become enslaved by sin so that we divorce ourselves from Him forever, our minds crisscrossed with stony tracks of evil thought. He wants us to be happy.