Why does 74hc595 work "better" without GRND (pin 8) grounded?

lars-erik:
But your code uses lsbfirst.

No, it uses msbfirst.