Sandwiching the thermostat probe between the heat source and the glass on the outside of the tank ensures consistent temperature control. As you mentioned, if it is inside the enclosure a snake could move it, it could get wet, or any other number of things could cause inaccuracy.
It's important to remember that a thermostat is not a thermometer. One regulates a heat source, the other reads the temperatures that are being regulated. The thermometer is what then tells you to increase or decrease the set point of the thermostat based on the end result.
I recommend placing the thermostat where it will be the most effective and picking up an infrared thermometer to give you accurate temperature readings inside of your enclosure.