(CNN) Lori Lightfoot did something during her victory party last week that once would have been considered obscene.

As Chicago's beaming mayor-elect stood at a podium, she turned toward her wife, Amy Eshleman, and kissed her in full view of a roomful of jubilant supporters while photographers snapped away.

The images of that moment looked like a sneak preview of a New America breaking through -- a black, gay woman kissing her white wife before a mini-rainbow coalition of onlookers. And nobody raised an eyebrow.

But focus on just the black supporters in that room and another image emerges. The black vote -- especially members of black churches who mobilized on her behalf -- was crucial to Lightfoot's victory.

What if Lightfoot had been standing in the pulpit of one of those black churches when she kissed her wife?

"In probably 90% of the black churches, she would be put out or asked to leave," says the Rev. Martha Simmons, a scholar on black preaching and a consultant to an upcoming PBS special on the black church.

There is a cruel irony in Lightfoot's election that few, if any, are talking about. Many of the same black voters who asked her to lead their city wouldn't dare ask her to lead their own churches because she is a gay woman. Women and LGBTQ members are still treated like second-class citizens in many black churches across America.

Two of the nation's largest black church groups still do not officially accept women clergy or bishops. And while largely white denominations like the United Church of Christ, the Episcopal Church and the Presbyterian Church (USA) affirm gays and lesbians, most black churches in America still have a "don't ask, don't tell" policy that forces its LGBTQ members to live in the closet or be consumed by self-loathing.

JUST WATCHED Lori Lightfoot on the challenges facing Chicago Replay More Videos ... MUST WATCH Lori Lightfoot on the challenges facing Chicago 00:55

Yet Lightfoot was able to get many of the same churchgoers, including many who declare that "God didn't make Adam and Steve," to vote for her. She won the key endorsement of a black Gospel recording mogul reared in a church that considers homosexuality a sin. She converted skeptics while campaigning at black churches. One of the city's most prominent black pastors said she couldn't have won without the strong support of Chicago's black church community.

Her victory is bigger than Chicago or politics.

How did she do it?

The answer to that question can be found in a peculiar way of thinking in the black community that is at once "beautiful" and "terrible."

What the terrible looks like

Ask many gifted, ambitious women who attend traditional black churches, and they can tell you about something terrible.

Black women are the heart and muscle of the black church. More than two-thirds of a typical black congregation are women. But click on the web sites for groups like the National Baptist Convention, USA, Inc. or the Church of God in Christ, Inc. and you'll see that virtually all their leaders are solemn-looking black men staring intently at the camera. The pictures look as out of date as those black-and-white photos of all-white NBA teams from the 1950s.

Ask these black church groups about their attitude toward women and LGBTQ people, and you'll hear everything except a full-throated affirmation of both groups as equals.

The National Baptist Convention won't come out and officially say women cannot be ordained as pastors. Instead, its web site says it " does not offer specific support for female ministers at this time.

The Church of God in Christ is more straightforward . It does not allow women to become senior pastors or bishops, though it accepts some as "evangelists." Both church groups cite a battery of scriptures to defend their treatment of women and their stance that homosexuality is a sin. That's another cruel irony: Both employ a literal reading of the Bible to justify exclusion, even though that same approach was used to justify the enslavement of their ancestors with scriptures like " Slaves, obey your earthly masters. ...

JUST WATCHED Lightfoot to Chicago: You did more than make history Replay More Videos ... MUST WATCH Lightfoot to Chicago: You did more than make history 02:06

Some of these men are threatened by barrier-breaking women leaders like Lightfoot, says Simmons. Don't talk to them about changing times or the changing faces of politics.

"They think, 'Why would I believe that women's roles have changed when it doesn't serve me.' Why would I believe that, especially given how many women are in seminary. There are now more women in seminary than men," says Simmons. "Do you really believe that men are going to help women get jobs that only men were once able to get?"

And then there's another terrible tradition in the black church that I saw first-hand -- the many LGBTQ members who were humiliated by their congregations.

I once attended a black Baptist church where the senior pastor wouldn't allow women to preach and taught that homosexuality was a sin. There was one catch -- his right-hand man was gay, and virtually everybody in the church seemed to know it.

This man was a pillar in the church. He was one of those unsung heroes who make a church function -- attending dull late-night meetings because somebody has to, bringing meals to shut-ins, arranging the pastor's schedule. I can't think of a moment when he didn't have a smile on his face.

He was killed, though, by a young man he'd invited to his home. I thought the grief would break the unspoken agreement in the church to never talk about his sexuality. But when I asked a buddy of mine who attended his funeral if they had finally talked openly about who he was, he reacted with scorn.

"Of course not. It was completely whitewashed," he said. "Some speakers even pretended that he liked women."

As to why so many black churches are like this, the answers could fill a book.

Here's one from the Rev. Otis Moss III, senior pastor of one of the largest predominately black congregations in Chicago. He points to how often blacks have been told by America they aren't welcome.

"Those who have been traumatized pass on their trauma, and for some it makes them feel powerful to hold power over someone," he says. "Those who have been held back are able to say to another, 'You are not fully human.' "

Lightfoot, though, somehow marched into this black subculture of trauma, repression and contradictions and convinced enough black churchgoers to vote for her.

She made a believer out of the skeptics because of another tradition in the black church that isn't terrible.

It's "beautiful."

What the beautiful looks like

Moss, pastor of Trinity United Church of Christ, knows about this side of the black church, and he points to how it operates in politics.

His father was a close aide to the Rev. Martin Luther King Jr. Former President Barack Obama used to attend Trinity, and the Rev. Jeremiah Wright, whose fiery sermons almost derailed Obama's first presidential bid, led the church for over 30 years.

Moss says there is a tradition of pragmatism in the black church in which congregants ultimately care more about a leader who can deliver than one who can quote doctrine.

He tells the story of a politician who tried to answer questions about his sexual orientation before a black church elder cut him off:

"Child, I could care less who you date," the elder told him. "I just wanna' know what your policy is going to be."

This vein of pragmatism is what Lightfoot tapped into.

Moss says he was impressed with how Lightfoot showed up in so many black churches and took on every question. He says she couldn't have won without strong support from the black church.

Lightfoot ran as an outsider. She wasn't part of the political machine in Chicago that many blacks distrusted. She had never held political office before. Turns out a lot of black churchgoers felt like outsiders in Chicago, too.

A former federal prosecutor, she capitalized on the outrage sparked by a white police officer's fatal shooting of Laquan McDonald, a black teenager, to launch her campaign as a reformer.

"Racism is a great equalizer," Moss says. "Regardless of your sexual orientation, we are still hit by the same political machine that attempts to marginalize people of color."

A crucial moment for Lightfoot came when she gained the endorsement of one of the most well-known figures in Chicago's black church community. Willie Wilson is a prominent businessman and gospel music impresario with a following among older black churchgoers in Chicago. He placed fourth in the mayoral primary, winning the highest percentage of black votes.

Wilson is also the "devout product" of a socially conservative black church that teaches that homosexuality is a sin, according to a Chicago Sun-Times story . But he threw his support behind Lightfoot even as others sought his endorsement.

Wilson echoed the church elder from Moss' story -- Lightfoot's policy positions were ultimately more important than her piety. He said her sexual orientation wasn't a primary concern for him.

"This thing's about working with me, and should be about economic and social issues. It should not go outside of that," he said in a Chicago Tribune story

Now here's the sticky part. Some say that the pragmatism of many black churches is really just a fancy word for hypocrisy. How, for example, are black churchgoers' voting habits any different than those of white evangelicals who support Trump and oppose gay rights?

Moss doesn't see it that way. He has another term to describe the difference between what black churchgoers profess and what they practice. He calls it a "beautiful contradiction" -- black churchgoers can embrace a doctrine that excludes a group of people but jettison those scriptures once they get to know and love such a person.

He recalls a story he heard from another black pastor. The man had conducted the funeral for a person in his congregation who was transgender. A deacon stood up during the service and said he couldn't abide by the ceremony because the person they were saying goodbye to dressed as a woman.

Then another group of deacons stood up and talked about how that same person had been a force in the church who had done so much to help people. "She will be buried with full honors," one deacon said before sitting down.

Relationships take precedence over doctrine in many black churches, Moss says.

"When you have a relationship with someone, you see the sacredness of God flowing through them versus a doctrine that's been stuck in the back of your head," Moss says.

Jonathan Walton, a professor of religion and society at Harvard Divinity School, amplified Moss' point. He says it's simplistic to say most black churches are homophobic and anti-women.

He says those black churchgoers who voted for Lightfoot weren't defying black church tradition; some were acting within it.

"Are we really changing when we go into the voting booth or are we just as pragmatic in our religious spaces," Walton says. "Do I wish we would actually challenge homophobia, sexism? Absolutely? But do I think black churches are just bastions of homophobia and sexism? No, not quite."

Still, what about the gifted women who will never be able to preach or become bishops? What about the members of the LGBTQ community who cannot be recognized for their full humanity -- like the aide to the pastor who was gay?

I tell Walton about the aide, and he says that even that story has some hope in it.

"It's what's beautiful and terrible at the same time about our community," he says. "It's beautiful because that brother who everybody knew who was gay probably found life in that community and had authority in that space he probably wouldn't have anywhere else.

"What's terrible, though, is the conspiracy of silence around a certain aspect of his identity, and that people felt like they had to love him in spite of his sexual orientation."

Why Lightfoot's victory is bigger than Chicago

This "beautiful contradiction," though, could be changing.

Simmons, the PBS consultant, says a new generation of black churchgoers and pastors aren't preoccupied with issues of gender and sexual orientation. Too many of them, she says, are struggling to pay student loans and worrying about getting gunned down in the streets.

"They don't have time for this foolishness about who loves who," says Simmons, who hosts a live discussion every Monday on her Facebook page about black church issues. "The young folks look at all that and say, 'No, no. We outta' here. We don't have time for this hypocrisy and for majoring in minor stuff while we continue to die.'"

Lightfoot's election could be a sign of that change.

Moss is confident the black church will eventually grow to fully affirm women and members of the LBGTQ community. He envisions a day when Lightfoot, or a politician like her, could actually kiss her partner during a victory celebration in a traditional black church. And the cheers wouldn't stop.

"I look forward to it," he says.

Some might think such a barrier-breaking moment would be terrible. But for others, one word would describe such a moment:

It would be beautiful.