It was Doyle's first Holmes story, and he needed an exotic setting. To a Scot of Irish extraction living in London, the Mormons were as unknown(and as exotic) as the Andaman Islander who figured as a villain in The Sign of the Four. He just needed a plausible motive for his murderer to pursue his quarry, and a sympathetic motive at that. So the villain was a wicked Mormon who was involved in the Mountain Meadows massacre, and stole the murderer's sweetheart. Half the book ("In the Country of the Saints") is just the sort of blood and thunder nonsense you would expect from an Englishman who had never been near America, let alone Utah or the West.
It's not really that good a book, although Holmes is one of those characters who takes on a life of his own. I agree that the Hound is a much better story, written much later in Doyle's career - better plot, better characters, better written.
My real question is why they ever picked Study in Scarlet as a typical Holmes story.
A slight misstatement regarding "The Sign of Four". Small was the villain; he participated directly in the robbery of the merchant, and his murder. Tonga, the Andaman Islander, only killed Sholto because he thought it would serve Small, his only friend in the world. Mistakenly, of course.
FReegards!
Yes ... but American Zane Grey was even less thrilled with Mormons. His "Riders of the Purple Sage" is a case in point.