I don't think it would have been a random search. They can do that easily, say, every 50th passenger going through the Customs checkpoint. No, they went to the trouble of separating your luggage and having Princess go into their passenger system to flag your records. Clearly, they wanted to talk to you. The dogs must have hit on something in (or on) your luggage. Not that the dogs can't be mistaken, of course.
Aside from that, how did you like your cruise? The Statuesque Mrs. RNE and I will be boarding Emerald Princess two months from today. Looking forward to it. ^