The active chemical in marijuana - THC, the chemical that produces the "high" - has a limited shelf life. THC will diminish and be out of a person's system the same day. But there's an inactive chemical, as EJ Montini writes for the Arizona Republic, that doesn't go away for weeks.
The problem is that both chemicals, including the inactive chemical that doesn't produce the high, can lead to a DUI arrest in Arizona if law enforcement finds it in your system. In other words, you're simply not driving under the influence - you aren't under the effects of marijuana - but yet you can still be charged.
Why is this?
It boils down to the way an Arizona appeals court ruled: "We determined that the legislative ban extends to all substances, whether capable of causing impairment or not." So if you've got evidence that you smoked marijuana at any point, even though the effects wore off long ago, you're at risk of a DUI conviction.
All this in spite of the fact that Arizona allows the use of marijuana for medical purposes.
Source: Arizona DUI law far from fair