I do wonder why Bernie didn't vote (and why some people voted against this), but it's also possible that it wouldn't have mattered.
The real voting is often done at the party whip level. If McConnell knew Bernie was going to show up and vote, it's possible that another Republican would have voted nay.