Uber Technologies Inc and Lyft Inc are spending millions of dollars to provide drivers with access to COVID-19 vaccines and offering tens of millions of free or discounted rides to vaccination sites for people in communities that lack access to transportation and healthcare services.

The effort is both public-spirited, and self-interested.

Ride-hailing demand is ramping up throughout the United States from pandemic-induced lows, but drivers are still slow to return to the road, slowing the companies’ efforts to rebuild revenues.

Lack of transportation is a major hurdle to healthcare equity and vaccine access, and studies show fewer options for medical care in low-income and Black communities, which are frequently poorly served by public transit and have lower car ownership rates.

At Uber, a large team of employees has started calling thousands of drivers who left the platform over the past year, asking them what they need to return, Uber U.S. and Canada Head of Driver Operations Carrol Chang told Reuters.

The company is trying to address drivers’ main concerns – safety and earnings – through mask mandates, a vaccination partnership with Walgreen’s and $250 million in pay guarantees and incentives.

The Walgreen’s partnership has allowed Uber to distribute unique codes to more than 240,000 drivers in several states, including California, Illinois, Virginia and New Jersey, allowing them to book a vaccination appointment at the pharmacy chain.

Lyft said it is emailing drivers when they become eligible for vaccination in their states. The company requires masks and offers pay incentives and promotions in select markets.

Julia Paige, Uber’s director of social impact, who is in charge of the vaccine rides program, said that in her conversations with company management “I really tried to show people that there are times when doing good is good for business.”

While Uber has not disclosed the costs of the largely self-funded vaccination programs, analysts estimate the roughly 10 million free and discounted rides the company has promised will cost $50 million to $100 million.

Lyft said its vaccine rides are paid for in partnership with corporate sponsors, including JPMorgan Chase, Anthem Inc and Target Corp, and private donations.

Officials in Chicago, New Orleans and Jersey City, New Jersey, and nonprofit groups working with the companies said the rides have allowed thousands of people to get vaccinated who otherwise likely would not have gotten a shot.

“There’s a huge swath of people sitting on the fence about this vaccine, and only if they have access to it they’ll get it done,” said Tamara Mahal, leader of the Chicago health department’s vaccine operation, which has partnered with Uber to offer free rides to 5,000 people.

The Uber and Lyft vaccine rides can be booked by cities or nonprofits on behalf of residents, or by passengers through access codes. Drivers receive the regular fare for the trips, an important element for nonprofit United Way, which partnered with Lyft.

“People who are driving for Lyft and Uber are financially challenged in our society and this creates more work for them,” said Suzanne McCormick, the organization’s president.

Uber and Lyft say they are not collecting passenger data for vaccine rides, and the data is protected by health privacy laws.

Some city and nonprofit partners said the vaccine service has introduced older people and those in transit deserts to the potential benefits of ride-hail services.

Uber and Lyft have both set up fledgling health businesses, aimed at providing non-emergency medical rides to cities and healthcare facilities. Many of the vaccination rides are provided through those health units, and closer ties with government agencies and healthcare providers could spell more business opportunities down the road.

Lyft said rides to vaccine centers organized through its healthcare unit were paid for by the clinics and facilities booking them, but counted toward its vaccine access campaign goal.

In New Orleans, Uber is providing a total of 20,000 free or reduced-price rides to the city’s mass vaccination sites. Laura Mellem, public engagement officer of New Orleans’ office of homeland security and emergency preparedness, said the city was so happy with the partnership that it was discussing how Uber could help with evacuations during the yearly hurricane season.

City officials said their vaccine collaboration with the companies does not change their outlook on other issues, such as driver pay, taxation and congestion, which have frequently caused rifts between local regulators and Uber and Lyft.