The 'why' is mainly addressed in the post Glen_b linked under your question:
Don't throw away all votes when a user is deleted
The main causes are 'vote fraud' and 'sock puppeting accounts' (creating a fake account for voting own posts, which is a type of vote fraud). Discarding votes from deleted-accounts used to be a major problem in the system; that meta post was heavily upvoted and remained that way for a while; but it was updated in 2015.
The SE staff lowered and diversified thresholds for automatically discarding votes from deleted-accounts. I myself have complained about it once, but now with the recent change, I believe it is no longer a big concern. Also, it is not likely to be changed soon. See Shog9's answer (emphasis is mine):
I'm not gonna call this completed; as you and everyone else reading this know, we do still throw away some votes for some user-deletions... and probably always will for the reasons you noted in your proposal.
But if you think it is still worthwhile changing it, I suggest you raise a related discussion in the main Meta Stack Exchange site, since this feature would affect the entire system (i.e., all the other communities) and there would be much more participation. Just make sure the question is not a duplicate and it is well posed; otherwise, it can be quickly put 'on hold', and then, closed.
And a final opinion on:
Just because the person may have done something wrong doesn't mean that their votes weren't valid.
But it doesn't mean they were valid either. I think it would be cumbersome to manually check all deleted-accounts and still prevent fraudulent activity; that is why the votes will be automatically discarded if that user had a low number of votes or just few users affected from their activity.