Personally I can't say why Israel holds the prisoners it does. It is entirely possible that some should not be held prisoner even by Israeli law. It is far more likely that Hezbollah considers the improsinment unjust.
However the fundaemntal problem is that you set all other considerations aside when you said that "getting people back" takes priority over everything else. Israel is not simply attacking Hezbollah. They are bombing the airport in Beirut, even attacking Tripoli even further away from the actual fighting. They even hit a Lebanese army barracks although the Lebanese army is not involved in the conflict (and has orders not to return fire).
So long as you take the attitude that Israel can do whatever it likes in the name of "getting their people back" even if said actions are killing innocents with no chance of actually contributing to the supposed objective, then you aren't in any position to pass moral judgement on others.t