I go into a dispensary here and I have to show my photo ID and redcard to the person first at the entry cordon, then at the register when I make a purchase.
Might be different for recreational in other states but here in the PA medical program, every single item dispensed is tied to your medical card #. Every single sales unit whether it's a few milliliters of tincture or an ounce of flower is uniquely identified with a serial/lot number.
The state also requires high def video surveillance of basically every angle in the dispensary and forces them to retain the data for 6 months for "investigative purposes".
So not only do they have record of the exact item I bought, when, and where, they have me on camera doing it AND can trace that item all the way back to seed.
I would hope a recreational program if the state were ever to adopt one would not be so invasive...but you never know.