The reason that they want a doctors letter is down to what is known as contra-indications.
Basically certain treatments ie. massage, hot stone massage, aromatherapy and nail extensions to name just a few can have implications for people that suffer from certain illnesses or allergies.
In the case of nail extensions with diabetics the reason that they may ask for a doctor's letter is because if a nail extension was accidently ripped off and caused a cut to the finger diabetics are more likely to have problems with infection than non-diabetic.
It's really just a case of the nailbar or whoever covering themselfs from a legal point of view in case anything happened to a customer.