Right. The rules says that regularly animating the dead -> evil character. But...
Is the rule on picking alignment a more general rule than the specific rule on alignment and animating the dead? Does specific beat general?
This isn’t really a case of specific conflicting with general. Let’s say I’m playing in a game you’re DMing (and assume you are using alignment in this game). I decide to play a neutral good wizard, and I take Animate Dead as one of my spells. Taking Animate Dead doesn’t constitute using it frequently, so I’m sure we can at least agree that wouldn’t make my character evil. Now suppose, during the course of play, a situation comes up where I think it’s necessary and appropriate for my character to cast Animate Dead. Again, I’m not exactly doing it frequently, it was just the once, so my character is allowed to stay Neutral Good, right? Now let’s suppose this happens several more times. Perhaps to the point where it can reasonably be said that my character casts it frequently. What actually happens as a result? Does my character’s alignment change? At what point does the change happen? How does this change of alignment actually impact my character and gameplay? The rules are entirely silent on this matter. At this point, my Neutral Good character can be said to have cast Animate Dead frequently, so it can’t really be true that in all cases, characters who frequently cast Animate Dead are evil.
We can do a similar thought experiment on a druid character who ends up in a situation where they feel it’s necessary and appropriate to wear metal armor. And in that case, we actually have precedent in Sage Advice for what happens: nothing, really. Someone makes a joke about the character exploding, and there are no actual consequences, short of the DM making a house rule to cover the situation.
Does it judge whether the player is honestly attempting to follow the rules in this one particular case?
It shouldn’t matter. Any rule that relies on being able to correctly guess a violator’s intentions is a poor rule, since that’s impossible to do with certainty.
This doesn't seem to me like the player arguing the morality of A with the DM or another player. In this case isn't it the actual rules that say "A=regularly animating the dead" is "B=only done by evil characters"? Once the judgement is made, it doesn't require any action on the part of the player or the DM. But neither do many (most?) other judgements in social circumstances.
It does require action on the part of the DM though. See my above thought experiment. If we take the statement that only evil characters cast spells like animate dead frequently as a prohibition against non-evil characters doing so, the only way to enforce it is for the DM to make a judgment call about what constitutes casting it frequently, and make up a house rule about what the consequence is for doing so.
There is, for example, a thread where some have said they don't care if players fudge die rolls or bonuses (in character creation or combat or other areas of play). Is there anything in the rules that requires the DM to act, or specifically empowers them to demand a reroll of the dice or a retabulation? (Does the DMG do anything beyond suggesting DMs ask players who scoop the dice before anyone else sees them to be less secretive?).
I don’t think there is, but the rules do say how the dice rolling procedure is supposed to work, and fudging or re-doing rolls isn’t part of it. Of course, groups are free to set their own social contracts and table rules.
Correct, the rules don't say casting necromancy spells is evil.
Right, which is the subject under discussion here. Are necromancy spells inherently evil? Not according to the rules of D&D 5e.
It says regularly animating the dead is only done by those who are evil.
Right, which is a statement players are literally capable of contradicting, and the rules provide no guidance for such a contingency. In the other case of such a weirdly worded “rule,” Sage Advice says, it doesn’t actually matter if you follow this “rule,” it’s basically flavor text, but feel free to set any house rules about it you want to.
There is a rule in this case though that objectively measures things. It says that only an evil character would regularly animate the dead. The rules are judging the character in this particular circumstance regardless of what the character has on their sheet.
The “rule,” if you interpret it as such is the opposite of objective. It requires DM judgment to even determine if a violation has occurred, and then a home-brewed consequence for such a violation.
And, in 5e it really doesn't matter I guess as far as the play. (Unless you're playing the Goodman B2 module and run into the clerics of chaos and the medallions they have... in which case it actually helps to not be good).
Right, it doesn’t matter at all, except in a handful of edge cases, all of which are either conversions or reimaginings of classic modules written for an edition where it did matter.