The judge was wrong, the statute makes no mention of how much money you make from your farm use of your land. If they had as many head of sheep there as is reported in the article, it would certainly qualify.
Who was there first does not matter. I bet the complainers were some a-holes that moved there from California.
https://www.oregonlaws.org/ors/30.936