That's not how the federal government and the courts see it. Look at the states that have passed medical weed laws, they still get busted under federal law.
Marijuana is illegal under federal law. Period. Raw milk is illegal to transport over state lines for human consumption. Hence the difference in enforcement.
There has been some change to federal enforcement of marijuana laws in states that have legalized it for medical use. The Feds don't arrest as many people with personal possession, though local authorities might. Feds do still go after those who are selling it and transporting large amounts, because that is still illegal.
State marijuana laws have been muddled, leading to arrests simply due to ignorance on the part of those partaking in the drug. Here in Michigan, they recently passed laws allowing medical use, within your own home. There have been people crying 'injustice' about being arrested after lighting up in parking lots and other public places, not accepting that they were in violation of the current law.
Raw milk isn't federally banned from being sold, interstate sales are prohibited. Intrastate sale is allowed in roughly half of the US, the other half prohibiting the sale to some degree.
In Michigan you cannot sell milk to anyone if it has not be pasteurized. They almost made it illegal for farmers, farmhands and farm animals to consume raw milk. Other states may only allow sales directly to the consumer, but not to restaurants or grocers. Some allow raw milk for animal consumption only, and may have regulation in place that the milk must be dyed in order to make it less appealing to people.
Comparing raw milk prohibition to marijuana prohibition isn't really accurate, since there is a great discrepancy between the two. Yes, it boils down to the government telling you what you can and cannot do with your body, but the actual regulation involved isn't the same.