By having the spindle inside the wall the coldest location with water when the valve is closed is kept at a temperature above the freezing point. If the valve spindle was outside there would be some amount of water that could freeze while it is trapped inside the pipe section potentially rupturing the pipe.