Different behavior than in simulator: 5V pin works instead of GND. Why is that?
The RGB LED's are available with common cathode and common anode.  That determines whether you connect the common pin to ground or to +5.

In your schematic you likely mismatched the selected part to what you actually have.  If you have the opposite type of LED as planned, just reverse the connection as you did.  You are not alone in this type of mistake.  see similar whot? here

A digital multimeter with a diode test mode would be very useful here.  The DMM would quickly measure the polarity of the diode tell you which lead connects to positive and which to ground.  

But did it really work correctly?  Don't you also see that you have to write LOW to the digital output to make the LED light up?