That is because they disliked what Allah revealed, so He rendered worthless their deeds.