Sure!
Coca-Cola is made by a recipe that has been kept secret pretty much since its creation. It is colloquially referred to by just the word "Coke".
Cocaine is a hell of a drug. It is sometimes referred to by the word "coke". However, the recipe for making it is dead simple and well known among the populace of the world, and very well known in areas where the plant it is made from is grown.
At one point, Coca-Cola included the same plant product in its recipe, and is where the "Coca" part of its name comes from. Thus, the joke also referred to that shared history as a neat little package.
Not really the best joke, tbh. But they can't all be winners ¯\_(ツ)_/¯