I'm in Ireland and I noticed the bathroom's light switch is located outside the room. I heard that is common here and in other European countries.
Why is that?
Because CENELEC standards, which are in effect in most European countries, restrict which kind of electrical equipment can be installed in rooms with a bath tub or a shower.
There are some minor differences in the regulations from country to country, but in general:
Residual-current devices became mandatory for new installations in many European countries during the period 1980 to 2000 and AFAIK, a few countries have also required older installations to be upgraded with one.
Aside from the regulatory issues discussed in other answers, this is sometimes done for practical reasons.
When designing a bathroom, there are a handful of design constraints that sometimes conflict with each other:
I've seen many cases (in various countries) where all of these design constraints cannot be met simultaneously. There's only one way for the door to swing without it hitting something or obstructing a walkway or blocking a sink. The doorway is so close to the shower that there's not enough space to install the switch between them. In that sort of scenario, installing the switch on the outside of the door is the least terrible option. The other options would be to install the switch on the back wall or on the other side of the doorway (behind the door), but that would require you to enter the room and fumble around in the dark to find the switch (which is both annoying and a safety hazard).
I've also seen light switches outside the room in some cases where the bathroom walls are tile/laminate and the walls were completed before the electrical was finished. Instead of having to cut a hole through the tile for the switch (which the electrician may not even have the right tools to do), the electrician puts the switch on the outside where they only have normal drywall to contend with.
The problem to locate the light switch in a dark room is real, and it can be solved by placing the light switch outside, in the well-lit corridor. Once you're inside the bathroom/toilet, you typically don't need to turn off the lights until you leave, so, again, the switch in the corridor suits you just fine.
There are legal requirements in some countries (including the US) that state the opposite: the light switch must be located inside the bathroom. If you come from such a country, the bathroom light switch in the corridor indeed does look surprising.
This is also common enough in the United States. I lived in several 1900-era Victorian homes and a 1924 Arts & Crafts home, and they do the same thing. In the latter case, the bathroom layout did not provide a workable place for a switch inside.
Needless to say, all these installations are grandfathered. However I think if you asked a local permit authority for an exception for this, you may well get it.
The United States isn't as worried about shocks from bathroom switches, because the problem of "making switches moisture-safe" has been placed squarely in UL's lap in their crafting of the "White Book" standards, coupled with two other factors: First, anything sold legally on the US market must be tested for compliance by an independent 3rd party recognized testing lab, unless you're Amazon. And second, our use of somewhat less dangerous 120V for lighting circuits (in which bathroom fans and heaters are usually also placed).