King the problem is that the rule is "no customers in employee areas" not because companies are trying to be mean but because they are covering their own arses (pun unintended) due to the compensation culture that has developed nowadays.
In a case of diarrhoea, it would be unfortunate but I am not risking my job and or taking the personal liability of taking a customer off the shop floor for anything, and by the time I had got authorisation the customer would have been better off going to one of the other stores in the retail park that did have public facilities. The customer could genuinely be in need but they could also be just as easily trying to scam the store or employees.
In our store, to get to staff toilets you have to go through the warehouse, through a security corridor, up two flights of stairs, through staff locker rooms and then to the loos (both of which do not have cameras).
So when it comes to liability the customer: could get hurt in the warehouse either by tripping over something or having something fall on them, they could see things like security systems/alarm set ups (if their intent was to scam/rob the store then this can be useful information), they could fall down the stairs, they could have access to staff belongings in the locker rooms and will be with a colleague in the loos alone. Without cameras covering the locker rooms and toilets, the customer could take things from bags/coats and/or can make accusations against the employee of inappropriate behaviour and it is their word against the employee's (and equally they could do/say something to the colleague that they would have no proof of).
In an ideal world you can trust that every customer request is genuine, but I have been in retail too long to do that - I have seen the most angelic looking teenage girl get pulled aside and be found to have £150 worth of stolen make up, perfume & jewellery in her bag, I have seen the most unassuming little old man go out of his way to deliberately run over a colleague with his in-store mobility scooter and have had the most vile insults and threats come from an elderly lady who wasn't getting her own way, and have had more customers than I care to remember straight out lie to my face about petty things (when I know for a fact they are lying) so it is not out of the realm of possibility that the customer "desperate for the loo" may not be being entirely truthful.