Section 15 of the Equality Act 2010 provides that an employer does not discriminate on grounds of disability if the employer did not know, and could not reasonably have been expected so, that the employee had the disability.
Some disabilities will be more obvious than others, and I am sure that we can all think of examples. However, mental health has the capability to be a "hidden" disability. A person who expects others to make allowances for his or her mental illness therefore need to disclose it, to ensure that those he expects to make adjustments are aware of his disability and therefore of the need to allow for it.
Those who do not have any particular experience of dealing with mental illness may confuse the signs of that mental illness with something else, such as common or garden stupidity, if the necessary disclosure is not made.