Even at lower levels there is a problem, I have heard of testing etc. I think people are under a huge amount of pressure, coaches and managers can lose their job after one or two losses, players pick up injuries and need to recover, for that they need medication that may or may not at that time contained banned substances.
While this is fine for recovery they need to be clean for competing.
Some medication can also mimick hormones, such as testosterone or oestrogen, this then causes additional problems.
I watched a program last year or maybe the year before. A person had consumed a bagette, that had on it poppy seeds, After being tested for drugs at work (routine in some work places) and FAILED the test for opium, so they had not even taken illegal drugs, just consumed food.
It seems to be a really complex state of affairs.