He has (had) two problems:
The taking of illegal drugs and betraying the trust of his passengers and employer.
I would have given him 6 months conditional discharge for taking ecstacy.
I would have given him a life time ban from flying commercially again for betraying his passengers and colleagues and putting them in danger.
It's the psychological bit I would need to protect the public from.
This man has no consideration for others as he pursues his quest for satisfaction - to the extent that he is quite happy to put everyone around him in harms way to achieve his selfish aims. This is why the judge did what he/she needed to do