The text is a humorous statement that plays on the expectation that experiments are supposed to work correctly, but instead suggests that if an experiment does work, it is unexpected and therefore something must have gone wrong. It does not exploit different meanings of a word or similar-sounding words.
If an experiment works , something has gone wrong