Wouldn't it be quicker for them to capture the city?
In a siege, once a city has been blockaded, the finite amount of space holding food stores will exhaust before the water since the water is general coming from a natural source and is therefore much larger. In ancient times walled cities were careful to secure a water source, either through wells of cisterns, that could not be poisoned. In modern warfare, sieges are not brought to conclusions by either starving or dehydration. Generally, a blockaded city will be starved of fuel and the forces to surrender due to lack of ability to fight.
Water can be replenished, through good wells, rivers or streams running through the city or even rain.
Water was more easily found inside the walls. Say from a well or water catchment areas. Food usually needed to be farmed outside the walls.