Starbucks the organization did nothing wrong. The Starbucks manager on behalf of the organization violated stated Starbucks policy (both nationally and in the region) by requiring people in their space to purchase something to remain; Starbucks the organization is now taking corrective action to ensure that everyone who works for or is a patron of Starbucks has the same expectations going forward.
The argument is not nor has it ever been, "is a patrons only policy wrong?" The argument is "telling patrons they don't have to purchase an item every time they are in your store and then abrogating that agreement only if you're black" is wrong and illegal, and secondarily (not that you even asked) that the cops should not have arrested anyone once they got there; they should have deescalated the situation. The bystanders were right, and the authority figure was wrong; they listened to the wrong people.
As far as what you've read: in this moment they were meeting a friend. Waiting to order your coffee until your friend gets there so you're drinking coffee together is polite, and is kind of the whole point of meeting for coffee. Meeting for "oh I already finished my coffee, now isn't this awkward" isn't a plan I've ever made.
> What am I missing here? What is the correct play for dealing with a non-customer that refuses to leave your store?
State that up front and enforce it without a racial disparity.
Starbucks want people to always come to their stores to meet and hang out because they sell more coffee that way. It's in their interest to not enforce a purchaser only policy.