Cards work like this:
Pharmacy has a price for medication. Pharmacy contracts with PBMs and as part of contract agrees to take their discount cards. When a card is used, patient gets a discount. Cash price for for Lipitor 10mg, for example, will go down from $200 to $50. Cost may be $4. Pharmacy's profit decreased from $196 to $46, but they still made a profit. PBM charges pharmacy a fee (percentage) to use discount card, which pharmacy pays. PBM pays out a company to run the discount card business. Company pays out distributors to literally distribute the card. I am a distributor, and literally anyone, your mom, dad, brother, sister, grandfather, grandmother, etc can be a distributor.