They weren't asked to leave though because they asked to use the restroom, they were asked to leave because they refused to purchase something. It's a coffee house, not a restaurant in which ordering out of sync with your party would really matter.
Why wouldn't the authorities be called if 2 white men refused to make a purchase & then consequently refused to leave at the request of the staff?
Myself & some friends had been told at a pub before that we'd each have to buy at least 1 drink in order to be allowed to stay to watch an FA Cup final several years ago. Naturally we all went to the bar & got ourselves drinks ranging from beers to Coca Cola's, the point being that if we'd said no, they'd have either had some bouncers somewhere that would have trailed us out by the scruff of the neck or they'd have called the authorities to do it for them.
Was this by the same member of staff? My understanding is that the 2 men asked the shift manager for use of the restroom to which she obviously declared that it was for paying customers only & she was consequently the one that called the police & dealt with them. Was she the one that gave the code out to the other lady moments earlier or was that another member of staff? If that's the case, then fair enough there was obvious discrimination involved if the same staff member had given access to 1 person but not another. This is presuming the third party hasn't got their facts mixed up & the women given access hadn't already purchased & finished something before she'd laid eyes on her.
As for the women claiming to have been sitting there for hours, I find it hard to believe that the staff fully knew she had been there for as long without buying anything, although from what I'm being told it's common to be allowed to go into places like this in the US & take up chairs/table space even if you or your party have no intentions of buying anything.. which sounds ludicrous to me that they'd knowingly allow you to do that in a buisness.
Here's a thought for you, rather than immediately jumping to the claims of racism, ever thought it might have been a simple mix up?
In the link you've posted when the man confronts the staff, the lady he's talking to declares she's the store manager & that she didn't give the white patron the code to which he doesn't argue, which would indicate it was true. Might he have been given the code by another member of staff that didn't follow proper protocol?