From Big Tech censorship to Fortune 500 boycotts of Republican-led states, we’ve heard a lot the past year about “woke capitalism.” A related problem is “woke philanthropy”: Activists want to tell you not only how to make your money but how to give it away.

Major foundations like Ford and Mellon and other nonprofits big and small have shifted their missions toward combating “inequity” and “systemic racism.” Museums are jettisoning board members and canceling donors who made their money in ways counter to progressive orthodoxy. Government officials are threatening the independence and privacy of philanthropists. “Donors have faced intimidation and threats of violence simply for supporting causes they believe in,” Elise Westhoff tells me.

Ms. Westhoff, 40, recently began her second year as president of the Philanthropy Roundtable, an organization of philanthropists and foundation leaders devoted to advancing “liberty, opportunity and personal responsibility.” Another focus is ensuring that foundations remain true to their donors’ intent, rather than changing their missions to keep up with the latest political fads.

The roundtable itself has become a target from rivals on the left. In May Phil Buchanan of the Center for Effective Philanthropy accused Ms. Westhoff of being part of a “backlash to last year’s reckoning on racism.” On a listserv for dozens of national and regional foundation leaders, a long discussion ensued in which one of the members accused Ms. Westhoff of “dog whistling to a very clear white privileged and racist constituency.”

Aaron Dorfman went a step further. From his perch as head of the National Center for Responsive Philanthropy, a sort of left-wing counterpart to the roundtable, he sent the group an Excel spreadsheet. The file included the names of more than 500 roundtable donors and a note: “This should help many of you see where there is overlap in your supporters.” The implication, Ms. Westhoff suggests, is that foundation leaders should distance themselves from those donors, perhaps pushing them off boards, or pressure them into changing the roundtable itself.

While the information Mr. Dorfman shared was publicly available, this move to “name and shame” donors—and to force disclosure of anonymous ones—is part of a larger trend that worries Ms. Westhoff. “There are many legitimate reasons donors may not want to publicly disclose charitable gifts,” she says, “including religious beliefs and a desire for personal privacy”—and, most of all, “fear of retaliation.”

So she was elated when the Supreme Court closed its term with a ringing vindication of donor privacy. In Americans for Prosperity Foundation v. Bonta, the justices voted 6-3 to strike down a California regulation requiring charitable organizations to disclose large donors to the state attorney general, who claimed to be building a confidential antifraud database.

Writing for the court, Chief Justice John Roberts quoted a 1958 precedent, NAACP v. Alabama, which found that “inviolability of privacy in group association may in many circumstances be indispensable to preservation of freedom of association, particularly where a group espouses dissident beliefs.” Ms. Westhoff calls the decision “a win for philanthropic freedom.”

The roundtable filed a friend-of-the court brief on behalf of the petitioners, two conservative nonprofits, but support for their case crossed ideological lines. The NAACP, which had prevailed in 1958, and the American Civil Liberties Union were among the signers of another brief for the petitioners. But the court’s three liberals dissented. It wasn’t enough, Justice Sonia Sotomayor wrote, that the groups could point to “evidence that their supporters experienced threats, reprisals, and harassment when their identities and associations became publicly known.”

Ms. Westhoff says that, in 2021 alone, 16 states have considered enacting donor-disclosure measures similar to California’s. The court’s broad ruling in AFP should put a stop to such efforts, but there are other threats. A California legislative proposal targets donor-advised funds—charitable savings accounts, whose holders take a tax deduction when they deposit money, which appreciates and is later contributed to charity. Under the proposal, such funds would have to report to the state the individual activity of each account in their portfolios.

At the same time, members of Congress, led by Sen. Sheldon Whitehouse of Rhode Island, have waged war on what they call “dark money”—donations to ideologically uncongenial nonprofits. Ms. Westhoff says Mr. Whitehouse “calls out donor-advised funds . . . and foundations, some of which are completely transparent about their mission, simply because they do not advance his personal partisan agenda.”

The roundtable was founded in the 1970s as an informal network of donors committed to fulfilling donor intent and finding effective ways to give money. It was incorporated as a nonprofit in 1987 but didn’t get involved much in policy questions until 2004, when its leaders created a lobbying arm, the Alliance for Charitable Reform, to educate the public and lawmakers about American charitable giving.

The roundtable’s leaders are swimming against a powerful tide. On “60 Minutes” this spring, Darren Walker, president of the Ford Foundation, told Lesley Stahl that his all-encompassing goal is to fight inequality. “Inequality is the greatest harm to our democracy because inequality asphyxiates hope,” he said. He even disparaged generosity: “Generosity actually is more about the donor, right? . . . Justice is a deeper engagement where you are actually asking, ‘What are the systemic reasons that put people out onto the streets?’ ”

Ms. Westhoff worked with Mr. Walker when she was a fundraiser for the New York Public Library. She says she’s puzzled “by how he has come to the conclusions he has given his background.” Mr. Walker, who is black, was raised in a shack by a single mother in East Texas and rose to become the leader of a multibillion-dollar foundation. “I think he is an example of the American Dream,” she says. “Anyone can reach his unique potential, and anyone can succeed in this country, despite whatever circumstances they have.”

She worries about the effort to reshape philanthropy, which Mr. Walker now leads and has been decades in the making. It was Ford Foundation money, she notes, that in the late 1960s and early ’70s “helped lay the groundwork to create minority voting blocs by promoting separate identities based on race and ethnicity.” That has evolved into a broad yet single-minded effort to abolish “inequity,” or racial disparities.

Against ideological monomania Ms. Westhoff defends the charitable impulse, which is often idiosyncratic. “I think when you start imposing those ‘musts’ and ‘shoulds,’ you really limit human generosity,” she says. “There are a lot of different kinds of people in this country, and there are a lot of people in need. And, by the way, there are people who want to help animals, and they should be able to do that. And people who want to work on climate change.” She attributes the scope and success of American philanthropy to the freedom to “find unique causes [we] care about and invest in those causes.”

Increasingly, there are calls for the government to direct the flow of charitable dollars. Ms. Westhoff has spoken out against the Initiative to Accelerate Charitable Giving and the self-described Patriotic Millionaires, which urge Congress to mandate foundations and donor-advised funds to pay out their accounts more quickly.

The rationale behind many of these efforts seems to be that the government acquires an interest in your charitable contribution by allowing you to deduct it from taxable income. “To suggest that somehow because you get a deduction, now the government gets to tell you everything about it is misguided,” Ms. Westhoff says, “and is not true in other parts of the tax code.” If you take out a mortgage to remodel your house, you can deduct the interest. But the Internal Revenue Service doesn’t get to vet your architect.

Besides, when it comes to helping people in need, charities do better than the government, Ms. Westhoff says. “We were all nervous at the beginning of the pandemic that giving would go down, but the opposite happened.” Contributions rose 2% in 2020 over 2019, and individuals’ average annual donations grew almost 20%, to $737 from $617. Fidelity Charitable, which administers donor-advised funds, reports that in the first four months of 2020, its “donors nationwide recommended 544,000 grants totaling $2.4 billion—an increase of 16 percent from the same time period in 2019, despite a stock market that plunged in March and widespread fears of an economic recession.”

That makes sense. “If you were saving for a rainy day,” Ms. Westhoff says, “it’s pouring” during the pandemic. “People really stepped up, they innovated, they looked at their grantees as partners,” she adds. “They were able to make a lot more progress with that mindset.”

Because the lockdown closed many schools, education was a particular priority. The roundtable hosted a virtual event last year with 31 donors to hear about the National Summer School Initiative, which employed master teachers from high-performing schools to help other teachers improve online instruction. The webinar raised $1.1 million. By the end of the year, the initiative was serving more than 12,000 students in 53 schools and at least 18 states. Other donations supported pods or microschools for children trapped in districts where schools wouldn’t open.

“When government was floundering,” Ms. Westhoff says, “philanthropy was able to step in and fill those gaps.” She cites Dave Portnoy’s Barstool Fund, “which has raised nearly $38 million to distribute to struggling small businesses” along with “the many community foundations” that “also established funds to support small businesses.” Given “their existing relationships in the community,” they were able “to quickly identify the greatest need.”

The pandemic also showed the benefits of what Ms. Westhoff calls philanthropy’s “long-term play.” Donations for medical research have accelerated in recent years. Ms. Westhoff—another of whose past jobs was director of funding for neuroscience at Indiana University’s School of Medicine—says many of those big donations “were foundational for success” in developing Covid vaccines.

Imagine if, a decade ago, left-leaning foundation heads and politicians had succeeded in the quick diversion of massive charitable resources to “social justice” initiatives. Donors would have had a lot less to spend during the pandemic. But few in the nonprofit world will point that out—perhaps because they’re afraid of suffering the fate that has met nonprofit board members for being insufficiently woke.

The Whitney Museum of American Art Board forced its vice chairman, Warren Kanders, to resign because he is CEO of the Safariland Group, a company that has sold tear gas to law enforcement. In 2020 billionaire investor Tom Gores was forced to step down from his post as a board trustee at the Los Angeles County Museum of Art because a company he founded, Platinum Equity, acquired Securus Technologies, which activists said was charging “egregious” rates for phone calls from prisons, jails and immigrant detention centers.

“There is a power dynamic there,” Ms. Westhoff says, “and I think some of the big progressive foundations are using that . . . to shame and force changes that they see fit.” But she thinks “these institutions should take more of a stand and be more courageous” in defending their donors. In the meantime, thanks to the Supreme Court, at least they can give anonymously.