Beginning this morning, Americans can no longer purchase cigarettes at CVS' 7,700 pharmacies. The pharmacy chain — which is the second largest in the United States, after Walgreens — had announced earlier this year plans to end tobacco sales. And today, the company followed through: cigarettes are off the shelves.

The move came along with a bigger rebranding of CVS, which changed its name today to CVS Health. With an eye on Obamacare, the pharmacy chain has increasingly aimed to position itself as a health care provider — somewhere you could go to get medical services with faster access than a traditional doctors office. Selling cigarettes, CVS says, would run up against that new mission.

So while CVS does expect to lose $2 billion in annual sales — about 3 percent of the chain's total revenue — they're making a much more long term, strategic play here. They're betting that health care is changing in two key ways.

Pharmacies will help manage customers' health

Pharmacies are typically where you go to pick up a prescription. The interaction is brief: give a name, date of birth, sign a form and walk out of the store, pill bottle in hand.

But that's not the future of pharmacies, at least how CVS sees it. They see that interaction as a huge, untapped opportunity to win contracts with hospitals and doctor offices aiming to cut spending.

Pharmacists arguably have the most interaction with patients; think of how many times you pick up a prescription versus your regular trips to the doctor. And that could put pharmacists in the position to help hospitals and doctors make sure that their patients are staying on track with their treatment — and, if all goes as planned, help prevent repeat trips back to the emergency room.

This is especially important at this particular moment, when a growing number of hospitals are getting into "global budget" contracts. These are deals where, in their simplest form, an insurance company gives the hospital chain a lump sum of money to care for their patients. If the hospital can provide care for less, they typically net a profit — hence the importance of keeping patients healthy.

hospitals want to cut health costs — and think pharmacies can help

All of a sudden, the pharmacist can become a key ally in trying to stay within that global budget.

You can see this strategy playing out with the deals that CVS has recently inked. Here in the D.C. area, for example, the chain announced last month a partnership with hospital chain MedStar. The two companies will share data through electronic medical records. CVS will know, for example, whether a MedStar patient has picked up a prescription they received at the hospital — and if not, can call them with a reminder.

Trying to counsel patients into healthier behaviors — quitting smoking, let's say — wasn't something CVS felt they could credibly do while also selling those same patients cigarettes. So they quit tobacco sales, and made a big bet that the long-run way to do better.

2) Pharmacies will become health care providers themselves

CVS has increasingly made a play into the health care provider space, quickly scaling up its Minute Clinic locations. It now has 880 of these clinics scattered across the United States. These are the walk-in offices next to the pharmacies that provide routine care, often during the night and weekend hours that traditional doctor offices aren't open.

cvs runs more than 800 health care clinics

These type of retail clinics have grown quickly, with companies like Walmart increasingly trying to scale up in this area (Walmart has, in a way, gone even further than CVS, and now provides full physicals for $40 at some locations). The bet here is that patients don't want to deal with long wait-times and difficult-to-schedule appointments. They also want cheaper care. And CVS thinks it can deliver: Minute Clinics don't require appointments and are staffed by nurse practitioners, who generally have lower salaries than physicians.

The same arguments from above apply here: if CVS' Minute Clinics are trying to help patients quit smoking, it's hard to justify selling them cigarettes a few yards away. If CVS' bets pay off, the lost revenue from cigarettes could eventually be offset by more contracts with health care systems and more visits to their clinics — an ultimate financial win for the company.