That's only legal if they are caught transporting it across state lines or on federal property. The federal government has no control of drugs within a state.
Terrible Russia holding Brittney Griner for possession of weed; USA Federal Law: Possession of marijuana is punishable by up to one year in jail and a minimum fine of $1,000 for a first conviction. For a second conviction, the penalties increase to a 15-day mandatory minimum sentence with a maximum of two years in prison and a fine of up to $2,500.