How is it possible to get an electric shock even with mains power off?
How could this have happened? By: 


assuming the wiring was completely and correctly labeled.
not verifying zero potential energy.
not having flipped-off ALL breakers in the absence of a main breaker.


If I understand it right, RCDs are the UK version of AFCIs, so if it was coming off a RCD, you shouldn't have gotten bit so bad: this breaker is fail; use the test button (or this was simply the wrong breaker).

In the US, code requires AFCIs in all bedrooms but not for convenience outlets in say, a hallway. It is very common to steal power from the 'hallway lights' for 'that-one-outlet-under-the-stairs' (no one would label it as such). This may or may not be code but I assure you it is done.