Different behavior than in simulator: 5V pin works instead of GND. Why is that? I use this simulator to check if what I want to do works. This is how it looks like:



I've recently realised that I've connected my RGB LED to 5V pin instead of GND like on schema. It worked perfectly that way (led worked and chanaged colors). When I connected it back to GND pin, it didn't worked.

When I went back to simulator and changed things to those that worked physically (using 5V pin) it didn't worked, but GND did.

Why do you think there are some differences? Can I use 5V pin instead of GND if it works? 

My Arduino: Arduino Leonardo.
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?