This depends on how you define 'irrational behavior.' If you define it as just not making sense, then yes, the above behavior is irrational to a complete outsider. But, since water, I guess, is 'more common' than 'diamonds' and is worth less than diamonds, then this is not really irrational as they could sell the diamonds, later for survival (in trade of food/water).