Have just seen this article in the Courier.
One of the comments points out that Fife Council is guilty of eroding the normal distance between staff and pupils by requiring staff to share facilities with pupils.
(It doesn't excuse the behaviour of the assistant, but it may explain to an extent why a particularly dim-witted man used to urinals might not see a problem with it.)
However, I would say that Fife Council has eroded the normal boundaries in existence between staff and pupils by initially telling some staff that they should be using the same facilities as pupils in new build schools.
Teaching staff complained and the professional associations claimed that nothing could be done.
I have relatives who are currently pupils in Fife high schools. In some schools, the HT simply solved the problem by designating one block as being single sex toilets for staff only.
In one of them, however, the accessible toilets have signs saying that they're 'all gender toilets', available for use by anyone and staff have been told to use these if they don't want to share a toilet block with pupils. This is making it harder for staff and pupils with disabilities to access a toilet when required - typically, there's one accessible toilet in a corridor.
https://www.thecourier.co.uk/fp/news/5599688/glenrothes-pupil-support-assistant-urinated-same-room-as-child/#Echobox=1792162103