I believe there were customary laws of warfare that governed how sieges were to be conducted. During the 2nd English Civil War the Royalists refused to surrender Colchester in a militarily hopeless position. When the town surrendered after two and a half months the senior commanders were refused quarter and executed for causing unnecessary suffering by prolonging the siege.
This! A defender was expected to ask for terms when the situation clearly was impossible. If the defenders for some reason did not do that they would usually not be given quarter.