The New York Times has this story about the Green Party of Arizona, and how a former Republican state legislator recruited candidates to run in its primary, even though the candidates have no connection with the party.
If state election laws would let small qualified parties nominate by convention, this problem would not exist.
The reason it is so easy for write-in candidates to be nominated in the primaries of newly-qualifying parties in Arizona is because the Socialist Workers Party won a lawsuit in 1980. The SWP had complained about the number of signatures needed to place a member of the party on the SWP’s primary ballot. The U.S. District Court Judge upheld the number of signatures needed for a candidate to get on the primary ballot (even though the SWP had so few registered members, it was impossible for anyone to get on its primary ballot), but struck down the companion law that required a minimum number of write-ins for anyone to win the primary of a newly-qualifying party. One write-in is sufficient, if the write-in candidate has more votes than anyone else running for the same nomination.
Write-ins are not counted in Arizona unless the write-in candidate files a write-in declaration of candidacy. If the Green Party had known that these candidates would be filing declarations of candidacy, the party could have recruited bona fide Greens to also file write-in declarations of candidacy, and the bona fide Greens certainly would have received more write-ins than the candidates recruited by the Republicans. But, the Green Party had no means of knowing what was about to happen, and by the time they knew, it was too late.