There’s never a good time for a highly regarded chief executive officer to step down, but Doug McMillon’s surprise decision to retire from Walmart Inc. looks particularly inopportune.