Anger has its rightful place, and here it fires on behalf of a friend against the injustice of a father. Jonathan rises from the table in fury and refuses to eat, because his own father has shamed the man he loves. Loyalty to what is right can outrank loyalty to blood. When the one above you in the hierarchy acts corruptly, the honest response is grief hardened into refusal.
The king is his father, and the future David threatens is his own inheritance, yet he sides with the truth against both. That is the measure of the man. To feel the wrong done to another as if it were done to you, and let it move you rather than reason it away, is conscience doing its work. Anger aimed at what deserves it defends the good instead of betraying it.