The laws say a certain thing on paper and there are edge cases that that occasionally get caught including a case from someone on this board who got rejected from the US for dogsitting on vacation but it’s one of these rules that is more honored in the breach.
The general rule of thumb is that anything that can plausibly be covered under a tourist visa, just get a tourist visa, be very nondescript at immigration and don’t worry about it.
Where the bulk of immigration enforcement attention gets focused is on foreigners working for a local employer under the theory that you’re taking away jobs from locals. If you arrive in a country and start tending bar at a local joint and earning local currency from a local employer, you’re much more at risk from immigration enforcement.
I would say, as long as the money for what you’re doing never enters or leaves the country and whatever you need to get done can be done within the span of a tourist visa, the government almost always implicitly tolerates you modulo a few random enforcement actions to make it seems like they’re doing something.
Looking online, Canada allows Australians to come in Visa-free now and while I don’t know when that started, most countries were doing that by the mid 90s.
I set up an American branch office for a US company, and Japanese employees went over for training for a couple of months, Americans came over and set up our seveers and warehouse, etc. No one needed business visas for these things because short stays for business are allowed.
Why would they have know he was working and not on vacation?
That’s part of the reason for this thread - when is it “work” that requires a work visa. This is also on that same page :
you don’t plan to enter the Canadian labour market
your main place of business and source of income and profits is outside Canada
and further down
Note: If you plan to stay for more than 6 months, or plan to work in Canada, you may be considered a temporary worker and have to apply for a work permit.
(that’s or not and)
The training the Japanese employees attended was probably allowed without a work visa, but setting up servers and a warehouse does not seem to be covered by this
Types of activities
Activities you may conduct as a business visitor include:
buying Canadian goods or services for a foreign business or government
taking orders for goods or services
going to meetings, conferences, conventions or trade fairs
giving after-sales service as part of a warranty or sales agreement
being trained by a Canadian parent company that you work for outside Canada
training employees of a Canadian branch of a foreign company
being trained by a Canadian company that has sold you equipment or services
As a non-resident American, as part of my tax return I have to tell the IRS how many days I was in the US and how many days of that was working. If my company wants me to work in the US, they can cover any extra costs related to me working there, as my place of employement is outside of the US.
Of mentioned, US citizens have tax requirements which are different than other citizens.