What's the purpose of adding water to a skillet when cooking solid food?
In this case, you are braising the apples.  The water is the braising liquid, which helps to cook the apples, reduces, integrates with the other ingredients, and becomes a sauce.  It also keeps the apples from sticking to the pan and burning.