There is certainly a chance that your diet pills were the cause of your failed drug test. Dietary supplements are not tested for their contents, purity and potency prior to sale and marketing of the products. The FDA typically only takes action on dietary supplements if there is a clear abuse of marketing health claims or they receive complaints about adverse events.
The lack of FDA oversight and the dubious label claims of over the counter supplements is well noted. Many studies have pointed out that a large number of dietary supplements do not contain the listed ingredients or contain adulterants or unlisted ingredients. One of the more recent well known actions that resulted from these studies are the cease and desist letters the New York attorney general sent out to various supplement retailers for false labeling claims.
The FDA as well sends our numerous warning letters every year to supplements manufacturers for products that contain unlisted, or adulterated ingredients.
In regard to amphetamine or methamphetamine specifically, there have been reports of diet pills containing these substances, or similar stimulant products that could possibility result in a positive test. For example, ephedra, which was banned in 2004, was known to cause positive tests for amphetamine. Although banned, supplements are still being reported for adding it as an unlisted ingredient.
Even if a diet pill doesn't contain amphetamine or methamphetamine specifically, urine drug tests are notorious for false-positives due to cross-reactivity of similar drug molecules. For example, Wellbutrin (bupropion), desipramine, phenylephrine and ranitidine have all been reported to cause false-positives for methamphetamine on drug tests.
So while it's difficult to definitively say whether or not your diet pill resulted in a positive methamphetamine drug test, that is certainly a possibility. If you are going to be taking over the counter diet pills, be sure to at least stick with reputable manufacturers.