Previously badges were based on counts, meaning "you have X badges" right now, compared to "you should have Y badges" right now. Unfortunately this meant for deleted posts or posts that for other reasons no longer match the criteria for a badge weren't counted.
For example, with enlightened you could get the badge for an answer then say it's downvoted to -9...you wouldn't get the next enlightened badge because we were comparing only the counts. This happened in many, many cases with multi-award badges.
Now, we check if you got the badge yet for that post (or tag, whatever it's based on)...if you haven't, we award it. Both of the badges awarded are valid at the time they're awarded, if they fall below the requirements later that's fine, and by-design you keep the badge.
You recently got the badge because you didn't get one previously for that post, it wasn't granted because a post prior to that no longer matched the criteria...and based on counts alone, we thought you had enough badges in the previous algorithm.