When I had surgery and was prescribed painkillers by my surgeon, I had to present my DL to the pharmacy, who copied it. Who knows where that info ends up.
I did not use them after they were prescribed. Glad I just toughed it out.
If I remember correctly, when the DEA comes to inspect pharmacy records they can point to the DL info to give to them to prove the right person was given the correct narcotic medication. If you have chronic pain and get refills on narcotic medications every month the pharmacy will ask for a letter from that doctors office so they can have on file when the DEA inspects the records to keep the DEA from asking why is this person getting this medication over and over and now a lot of the docs are e mailing the prescribed narcotic to the pharmacy to cut down on fake proscriptions.