In the case of microtargeted advertisements, Silicon Valley’s basic business model is also more worrisome than the relatively small number of ads bought by Russian operatives. For example, less than two weeks before the 2016 presidential election, a senior official with the Trump campaign told Bloomberg Businessweek that it had “three major voter suppression operations underway.” These were aimed at young women, African-Americans and white idealistic liberals. One of the key tools of the operation, according to Brad Parscale, a Trump campaign manager, was Facebook “dark posts” or “nonpublic posts,” whose viewership was controlled so that “only the people we want to see it, see it.”

Mr. Parscale said that Facebook turned out to be so useful that the Trump campaign spent most of its budget of $94 million on the platform, and in response, Facebook helpfully embedded staff members with the Trump campaign (as it does with major advertisers) to help it spend its money more effectively.

Microtargeting, while lucrative for Silicon Valley, brings with it many other problems. Investigators at ProPublica found that Facebook was allowing advertisers to post job and housing ads that specifically excluded African-Americans, and even made it possible for people to select “Jew-haters” as a category to reach with paid messaging. The American Civil Liberties Union found that Facebook was allowing employers to show jobs only to men or to younger employees — excluding women and older workers.

In response to a barrage of criticism, Facebook has agreed to make all advertisements on its site available on a public database and limit some forms of microtargeting, but we still don’t know exactly what happened in 2016: What features of Facebook were used to help the Trump campaign find the voters who could be subject to this “voter suppression” effort? How was the platform used to test the messages that might be most effective at this?

This all leads to two other questions: Why does it take outsiders to discover such flagrant problems, and why does it take so much outside pressure to get the company to act? Again, follow the money: Silicon Valley is profitable partly because it employs so few people in comparison to its user base of billions of people. Most of its employees aren’t busy looking for such problems.

Wall Street is under no illusion about how things work for these companies. When Mr. Zuckerberg announced that Facebook would try to do better — even if it hurt profits — and when Twitter started purging bots, bringing down the number of “users” the company can report, their stock prices dropped because of worries about their long-term profitability.

It is understandable that legislators and the public are concerned about other countries meddling in our elections. But foreign meddling is to our politics what a fever is to tuberculosis: a mere symptom of a deeper problem. To heal, we need the correct diagnosis followed by action that treats the underlying diseases. The closer our legislators look at our own domestic politics as well as Silicon Valley’s business model, the better the answers they will find.

Zeynep Tufekci (@zeynep) is an associate professor at the School of Information and Library Science at the University of North Carolina, the author of “Twitter and Tear Gas: The Power and Fragility of Networked Protest” and a contributing opinion writer.

Follow The New York Times Opinion section on Facebook and Twitter.