For the author's central point to hold true those numbers need to be more closely aligned. That is, they need to be roughly the same in % terms. They aren't, which means one or both of the players are doing something substantially different in their approach. Given that labor costs are the single largest expense for these types of business it's not unreasonable to reach the conclusion of those she's rebutting with this article. Namely that Walmart is overly maximizing profits based on the back of paying extremely low wages. To put it another way, if for some reason Walmart was told to bring it's margins in line with Costco the easiest way to do that would be to bring your wages up and keep your prices the same.
Let's do back of the envelope math based on the chart in the article. If Walmart had the margins of Costco rather than the current ones that would see it's profit dip from $15.6 billion to $7.53 billon. That in turn would "free up" $8 billion in what is now pure profit. With 2 million global employees you could pay them all $4K more. That's a 20% salary increase for the basic salary they highlighted of $20K per year.
I'm not bashing Walmart. I'm just pointing out that Costco seems to have made the decision to have meaningfully smaller margins than Walmart. Given where the bulk of their costs lie they must have had the conversation more than once about paying folks less to move those margins up to please Wall Street more. Yet they have decided not to do that. Perhaps it's simply because they believe the business benefit around being easier for them to be accepted in new communities (and thus grow) based on the real and perceived perception that they treat their workers well.
PS: Anecdotally Walmart opened near us two months ago. I have now been there 4 or 5 times. I am struck by just how many people there are working there on the floor. There seem to be too many whenever I'm there. They look bored and so congregate in groups and shoot the breeze. I couldn't get that out of my mind as the author kept stressing they really need a lot more employees.