Thanking is not used to acknowledge a favor, thanking expresses gratitude. It means your boss appreciates your effort, that he doesn't consider you a robot who does work solely for the money. Maybe he thinks you put a little bit of yourself into the work.