The same is true in Canada. There are things that are federally illegal that are not illegal at the provincial level. There are also local laws that supersede federal law. E.g. There is no federal law against woodburning for home heat, but many local jurisdictions have banned it for air quality reasons, and provinces also have pollution laws. You can have something be illegal in one town, and legal outside of it, or illegal province wide but legal in another province.
What is going on is that not that weed is 'half-legal' in the states. It is fully illegal. What is true is that the federal enforcers have more or less decided to leave people alone when the state allows the use of Marijuana. Pre 2017, the exact same thing was happening across Canada where local jurisdictions allowed cannabis use and sales, and the RCMP basically turned a blind eye. Vancouver is the most obvious example, where there was actually a decline in the number of dispensaries after weed became federally legal.