You did not break any rules I can see - if they were prescription drugs etc. Diagnosis: pilfered / stolen. For recreational use and resale, or repackaging and resale if they are expensive therapuetics.
Even others' drugs I would not put in checked baggage. Anything valuable should be carried aboard. With prescription evidence, there is usually no problem - even the Customs folks will generally let amounts of prescribed drugs by that are technically beyond what you are allowed into the US for your personal use (within limits!)