What if Google also opened a subsidiary in a country that banned garb like that required by Saudi Arabian law? How do they follow both laws at once across their entire organization?
Generally speaking, if the corporation can demonstrate that it's not possible to implement the law of all countries it operates in, and within any one country it *does* follow the laws of that country, that's good enough.
The problem is, if you actually read this particular ruling, Google didn't actually demonstrate that. Their argument was, in a nutshell, "we're a global operation, the database is hosted outside your country, so your order doesn't apply to anything except .ca".
Where the database is hosted doesn't matter because it's pretty much a given that google.ca and google.com and google.* are essentially the same place. If google.ca can have a result blocked, that same flag can be applied globally. So that argument doesn't really pass the giggle test.
The fact that Google (or Twitter, or Facebook, or...) normally only blocks certain content in the country that ordered the block is a corporate policy decision, not a technical or legal limitation. Child porn, for example, is something they can and will block globally. But corporate policy is not the law in any particular country.
So, that leaves the "we're a global operation" argument. And the judges response to that argument was, pretty much, "Good. Then you can block it globally, too."
In other words, someone made an assumption that all you have to do to stop a court ruling at the border is to point out that there's a border. The judge didn't buy it. Better luck in appeals court.