This question already has an answer here:
- How do “badges” work? 1 answer
There was most probably an upvote for a short while that was removed by the voter within the 5 minute limit before the downvote was cast. Or a downvoter mistakenly upvoted your question and "corrected" that later.
However you got to the score of 10: In the meantime while you scored 10 the badge batch ran and awarded it to you. Once the badge is awarded it won't be taken from you.