Including a reason is not compulsory, but it is better if you do if you are leaving for positive reasons, such as promotion or relocation. This will prevent you ‘burning bridges’ and destroying relationships. However, if you are leaving because of a negative reason, such as disliking team members, finding your job boring, or just generally have a passionate loathing for the company, I daresay it is best to leave it out. After all, these people do your reference!
Whatever the reason may be whether it is negative or positive, it is better not to mention the reason!!