Drug taking is no respecter of background or education. I would also add that drug misuse is different from alcohol misuse due to the fact that most pilots drink alcohol. That is widely accepted as ‘normal’, but we as a community are expected to operate within the limitations laid down legally and by our employers (10 hours bottle to throttle etc). Drug taking for recreational purposes, however, is banned - that’s it. Everyone knows the deal and there is a zero tolerance policy in force at any airline in the world that I have ever heard of. Taking drugs is the third rail of aviation behaviour - touch it and you are dead.
Like everyone else here I am simply aghast that the pilot in question would not have questioned the wisdom of texting one of his cabin crew to boast about taking cocaine. Most people would have recognised it as career suicide. It does make you wonder about the culture that may have prevailed - simply mind-blowing naivety, stupidity and overall lack of judgment.