I have a starbucks a 10 minute walk from my house and I've gone there and logged into their wifi while waiting for a friend to show and then we ordered coffee's. The waiter was happy to wait. You keep trying to dodge the likelihood these men were asked to leave because of an attitude similar to yours.
My attitude is, if you're a customer, welcome, if not, gtfo.
Starbucks doesn't have waitresses, as far as I'm aware. The ability of the staff at the counter to tell how long people have been sitting at tables, esp without ordering, is limited compared to restaurants that have waitresses. Thus if you don't actually approach them and, say ask for the key/code for the rest room, they might not notice you for a while. In this case they asked to use the rest room. I guarantee you at that point they were asked if they were going to order something. It is possible they said they'd order something when their friend arrived. If that was the case, I don't see why anyone would have a problem. Unfortunately, the information is not clear. If they just said no, they didn't want to order anything it's entirely reasonable they were told to leave.
Everything which happened after that is entirely their responsibility. When you're told to leave, you leave. Especially when it's a cop telling you. You are not entitled to one damn thing in a private restaurant, and certainly not entitled to stay when told to leave.