Buyers pay earnest money to prove they're serious, and a lot of people assume that means the buyer loses it by default in any number of hypothetical scenarios, which just isn't the case.
In AL, where I'm licensed, if you want earnest money to be subject to retention as a penalty, you have to add a clause in the sale contract specifying how much, and under what conditions. It's rarely done. I don't know your local laws, but it's probably fairly similar.