To deserve is to be worthy of something as a result of one’s actions.
The dog deserved a bone for behaving very well.
Example picture