One of my college roommates was a home economics major, and I was astounded at all the chemistry classes she had to take. Turns out that in the kitchen, much of what makes a particular cooked or baked good good, is following certain rules of chemistry.
I don't come anywhere near understanding those rules. Why can you mix butter, eggs, sugar, milk and flour, put it in a hot oven, and produce a solid that stays solid? But if you leave out the flour, you get a semi-solid? What's magic about flour? The rules behind these results defy my understanding.
However, I've learned when cooking to obey the rules.
There are other rules out there that also result in certain outcomes. Pick your field--economics, physics, mental health, business--they all operate in the realm of rules.
So does our Heavenly Father. And contained within the Gospel of His Son, Jesus Christ, are rules for success. We call them commandments. Keep the rule or commandment, and you can count on certain results. Happy results. Break the rule, and misery is sure to follow. As a Book of Mormon prophet succinctly states it, "wicked never was happiness."
Why do these commandments work? Usually, God doesn't tell us. He just says do it. Magic? No. God just knows all the rules, and in spiritual things, success equals happiness, which comes from keeping those rules.
As Mormons we believe that through the Atonement of Christ all mankind may be saved, if we keep the rules--including the little rule about applying Christ's atoning blood by repenting of
all those times we ignore/disregard/flagrantly break God's rules.
Want happiness? Ask a member of the Mormon Church--the Church of Jesus Christ of Latter-day Saints--about the rules that produce it.