My guess -- and it's an educated guess, but still just a guess -- is that another passenger in the Customs line recognized Rush, saw him taken aside, and blurted to the media. Or an airport employee, often courted as sources by local reporters, saw what was going on and called in. The official statement, and Rush's statement (through his lawyer) were in response to press inquiries.
The Palm Beach Sheriff's statement was not the first report on the story. A local station said it had confirmed the story through unnamed sources hours before the first official statement. From that, I infer that the official statements from both sides were reactive.
And rather than intended to embarrass Rush, they were a reasonable move to correct the record -- while Viagra will certainly provoke chuckles (and already has, even on FR), it would be worse to leave incomplete information and the inevitable speculation that the unnamed prescription drugs were painkillers.
The first report if you recall was that Rush was held up for having prescription drugs..AMOUNT Not illegal, but it does raise eyebrows in Customs..AMOUNG THEM VIAGRA. Giving the impression he had multiple drugs. It was a slander hit piece tohurt him...period.