Even though weed is legal in Oregon, selling it on the street is not. He has previous arrests for selling drugs as well, so it's not far fetched to assume they saw him doing it again. When you resist arrest, no matter how much in the right you think you are, you are still going to get arrested by any means the police feel necessary.