I have never came across a state that allows "working" (in the meaning of a "doing a job") in its vicinity for tourist visa holders but I have came across many countries that don't allow it.
And yet, when someone works with a laptop for customers outside that country, I don't think it really reflects the meaning of "working" or "doing a job" in that country and therefore a place for interpretation becomes existent.
Is working from a laptop when travelling to countries with a tourist visa formally illegal all over the world?
What kind of activities are not considered to be “work”?
Examples of activities for which a person would not normally be remunerated or which would not compete directly with Canadian citizens or permanent residents in the Canadian labour market and which would normally be part-time or incidental to the reason that the person is in Canada include, but are not limited to:
long distance (by telephone or Internet) work done by a temporary resident whose employer is outside Canada and who is remunerated from outside Canada;
The key is the differentiation between "work" and "business". Imagine I'm a website designer, or a copy editor, or a software developer.
If I come to country A learn about "my thing" -- eg at a conference -- or to meet other people who do what I do, and nobody pays me for that, that's business.
If I come to country A and discuss the possibility of doing "my thing" for a client in country A, but no money is involved because it's a "sales meeting" -- that's business.
If I come to country A and do some things for my employer in country B, who continues to pay me a regular salary back in country B -- that's business.
If I come to country A and do "my thing" for a client in country A, who pays me personally for doing that, especially by the hour spent -- that's work
If I come to country A and do "my thing" for a client in country A, who pays my employer in country B, who continues to pay me a regular salary back in country B -- that's probably business but don't count on my opinion
Notice that all of that can involve a laptop and someone local -- that's not what's relevant in whether something is permissible or not. Business is allowed on a business visa. While it is not allowed on a tourist visa, many countries have a single "visitor" visa that covers both business and tourism. Work is only allowed with a work visa or work permit.