>How can an error count against the pitcher's record when it's made by a player fielding and not by a player pitching?
are you asking logically or practically? Practically you do it by changing the scoring rule. 😉 Whether it's logical is clearly in the eye of the beholder.
>And how can it can called an earned run against the pitcher when it is not credited as a earned hit for the hitter?
But there is no hard and fast connection between hits and earned runs now. The hit that scores a run isn't necessarily the play when the error occurs. That later hitter still gets his hit whether the run is ultimately ruled earned or not. And as it is, there may or may not ever be any earned or unearned run after a hitter doesn't get his hit after reaching on an error.
I don't particularly have a dog in this issue, - I can see it either way, but I don't think changing it would be a big deal either.
That said, I don't see much chance it actually does change so we are just spitballing about it anyway.