Thomas Aquinas, Summa theologiae 1-2 q. 94 a. 4 co. “Apud omnes enim hoc rectum est et verum, ut secundum rationem agatur.     Ex hoc autem principio sequitur quasi conclusio propria, quod deposita sint reddenda. Et hoc quidem ut in pluribus verum est, sed potest in aliquo casu contingere quod sit damnosum, et per consequens irrationabile, si deposita reddantur; puta si aliquis petat ad impugnandam patriam.  Et hoc tanto magis invenitur deficere, quanto magis ad particularia descenditur, puta si dicatur quod deposita sunt reddenda cum tali cautione, vel tali modo, quanto enim plures conditiones particulares apponuntur, tanto pluribus modis poterit deficere, ut non sit rectum vel in reddendo vel in non reddendo.”  

It is right and true that all things should be done according to reason.  From this principle it follows as an almost inevitable conclusion that deposits must be returned.  And indeed this is true in many cases.  But it can happen that in a case it might be damaging and consequently would be irrational if a deposit was returned.  For example if someone would use the deposit to wage war against his homeland.  <Reason> can be deficient as one descends into particular cases.  Consider if it were said that deposits must be returned with a stipulation or in another manner with particular conditions attached.  In that case the many more reasons can arise that would make it not right to either return or keep the deposit.