Cooking fruit with or without sugar solution
It is a case of osmotic pressure. If you heat it in plain water, the sugars inside the cell want to cross the cell membrane and try to equalize their concentration inside and out. With sugar in the water, the osmotic pressure is already equal so they don't need to leave the fruit.