This is actually a fascinating situation. My take on it is that she fell out with "her first husband," Elijah Mayhew, when he took a second wife, the widow Sarah (Young) Peck. Lydia would have been in favor of the principle of rescuing widows, of course, but in this case it seems to have kindled some measure of jealousy.
On the 1860 census, she is shown as having reverted to her maiden name of Farnsworth. She is living with her younger children in a home in Pleasant Grove, Utah, while her "husband" Elijah Mayhew is living RIGHT NEXT DOOR with his new wife Sarah (Young) Peck Mayhew and her children by her first husband.
In 1870, it's about the same deal, except that by now Brigham Young has caved into her entreaties that "in the eternities" she was meant to be with him. As a result, now she is listed as "Lydia Young." In the home are three of her Mayhew sons, a daughter in law, a grandson and a niece. Notably she is NOT living in any of Brigham Young's homes in Salt Lake City. Next door is an "Elizabeth" Mayhew. At first I thought that this might just be a census-taker's mistake for "Elijah" as the age is about right for him. However, on further analysis it seems that it's actually a woman, namely Elizabeth (Seeley) Young, the mother of Elijah's second wife Sarah (Young) Peck. Also in the home is Elijah's third and newest wife Anna, with four young Mayhew children. These censuses are linked up on Lydia's familysearch (Family Tree) profile, KWJ8-Z39.
The 1880 census (https://www.familysearch.org/ark:/61903/3:1:33SQ-GYBK-XJ?view=index&personArk=%2Fark%3A%2F61903%2F1%3A1%3AMNSL-FS9&action=view) is not linked to Lydia's profile, probably because it was indexed erroneously - as "Lydia "Farnsuct." I found the entry by looking for her sons. Sure enough, the two homes are still there in Pleasant Grove, with Lydia occupying the one with her sons Walter and Otto. Elijah Mayhew is in the second house with his second wife Sarah. Anna had died from complications of childbirth, so she does not appear on the census. Elizabeth (Seeley) Young Mayhew (Sarah's mother) now has her own house next to these two.
It was not unusual in the days of Utah polygamy for a man to "marry" his widowed mother in law, as a means of giving her a legal basis for support and protection.
In sum, at least in practical terms, Lydia Farnsworth and Elijah Mayhew were divorced circa 1858-9, and her 1870 sealing to Brigham Young was a marriage in name only. The life stories about Elijah and her written by her children make no mention at all of the "sealing" to Brigham Young.
From my reading of Utah history, it seems that Brigham Young was viewed as having the power to grant divorces without requiring the parties to bother with the civil courts. If he granted Lydia a divorce in, say, 1859, that would explain her use of her maiden name on the 1860 census.
A final side note about this family: Lydia was a great-aunt of Philo T. Farnsworth (Farnsworth-669), the inventor of television.