Answer: State Law vs Federal Law
For a very brief explanation, federally the "grass" is illegal. But in some states, it's legal for either recreational and medical use. According to Cornell law, "Federalism is a system of government in which the same territory is controlled by two levels of government. Generally, an overarching national government is responsible for broader governance of larger territorial areas, while the smaller subdivisions, states, and cities govern the issues of local concern." In the case of the "grass" the federal government has the broad rule of outlawing it, but the federal government makes no effort to enforce the federal rule, as the DOJ would not take up the case of simple possession. So it's left up to the states.