There could have been a couple of things that happened.
1. The prescription may have been difficult to read and the pharmacist may have misread the prescription. Of course, he should have noticed the man's name of "Keith" and questioned the need for estrogen.
2. The pharmacist or technician may have just grabbed the wrong bottle off of the shelf and filled it and the pharmacist didn't check very closely to insure it was correct.
Unfortunately, most of the public thinks that all that pharmacists do is count pills and put them in a bottle. There have been a lot of studies to show that distractions is the number one cause of prescription errors. Retail pharmacies are so busy with phone calls, patients, people trying to check out, and patients complaining that it's going to take 15 minutes that the chance an error will occur is increased.