That's a stupid law. 2,000 ballots is like a 0.1% margin. The only way it could be 2,000 ballots and not 0.5% margin is if 80% of the people in the state didn't vote for said office.
Like I said, it applies to all elections in the state. The .5% rule is there for a small county office that sees only a few thousand votes.
The first thing you do is look to see if the final vote is within 2,000 votes. If not, election over. If it is then you look at the percentage. If it is within .5%, recount. If not, election over.
It does seem like it would be better to just have a percentage cut off or different rules for different levels of government. One standard for statewide offices and another for county and such.