Once you allow the general principle that religious law can override laws of general applicability, including religious law made up by people like convicted felon Joseph Smith, you've ceded that secular authority isn't supreme. The government then needs to get into the business of deciding what is and isn't legitimate religion, because otherwise, they can't sort out which religious law supersedes secular authority.There's not one. The court was saying they can ban polygamy (despite religious infringement) for similar reasons to why they can ban religious ritual murders.
We decided not to do that. First, the government shouldn't be into deciding what is a "legitimate" religious belief, and second, anyone of any religion can get involved in the political process, which is where we decide what laws apply to everyone equally. You're free to live a multiple partner lifestyle with or without a religious justification. What you can't do is claim a special legal status for it that's granted only to monogamy (and until very recently only for heterosexual unions).