Back when I was in business school in the 1980s, I was taught — as were generations of aspiring entrepreneurs and executives — that the business of business is business. “There is one and only one social responsibility of business,” the economist Milton Friedman famously wrote in “Capitalism and Freedom”: “to increase its profits.” In an essay for this newspaper in 1970, Dr. Friedman went further, arguing that executives who claim that companies have “responsibilities for providing employment, eliminating discrimination, avoiding pollution and whatever else may be the catchwords” of the day are guilty of “undermining the basis of a free society.”

Unfortunately, some C.E.O.s still embrace this myopic view and believe that they have a duty to shareholders alone, with little or no responsibility to the communities in which they operate. I contend that business must have a purpose beyond profits, and that such purpose can, over time, benefit both stockholders and stakeholders.

I’ve seen this in my hometown, San Francisco, and the surrounding Bay Area, which has the third-highest number of billionaires on the planet. Some high-net-worth individuals, including some who work in the tech sector, have been extraordinarily generous in supporting our public schools, hospitals and communities. Others, however, have given little or nothing, and they seem content to let local government bear the burden of enormous local challenges alone.

[The Opinion section is now on Instagram. Follow us at @nytopinion.]

The city of San Francisco, where one-bedroom apartments rent for an average of $3,300 and the median home price is a record $1.6 million, is experiencing a full-blown homelessness crisis. I’m a fourth-generation San Franciscan, and while there has always been homelessness, I have never seen it this bad. Families with children are living in cars and are packed into homeless shelters. There are tent encampments in city parks. The sidewalks are strewn with heroin needles and covered in human feces. A visiting official from the United Nations said she was “completely shocked.” An infectious-disease expert from the University of California, Berkeley, found that parts of the city are more unsanitary than the slums of some developing countries.