Customers are important to buy stuff too, so countries that are planning on losing a lot of employment often hope to make it up on export and often by offshoring, but to do that they feel they need trade agreements to protect their overseas investments. These agreements set up formal statuses that make it so countries have to treat firms from a subset of other countries exactly the same as they do their own, with some exceptions that work in the foreign companies favor. They actually get to have their cake and eat it too in certain areas. Things that domestic companies dont get. (Like the right to sue the government directly in a special court if the government changes any laws that hurt their bottom line after the signing of these agreements. Even things people wouldn't think would be impacted like raising their minimum wages- that is if they apply to the foreign company at all, which seems to still be in some ways, an unresolved question! This is called "ISDS" which stands for "investor-vs-state dispute settlement")
How might ISDS apply to the energy industry? Lots of ways. Energy is actually among the most litigated areas in ISDS. For example, Vattenfall is a (Swedish?) energy company that sued germany for deciding to phase out nuclear power because after Chernobyl, livestock in parts of Germany had radioactive meat, enough so that there is a concern that if they had another nuclear accident, meat produced in Germany would become unsafe to eat. And Germans are big meat eaters. That was culturally unacceptable for them. So Vattenfall sued them in a private arbitral court and everything involved with the case is secret. They settled but the sum and terms are secret. Its expected that if trade agreements similarly encumber the natural gas industry, any country deciding to stop fracking would be sued and almost certainly lose. ISDS is carving in stone an extractive model that people really are uncomfortable with in this context where the environmental costs can be huge, particularly for things like water. What happens if your well water becomes unsafe to drink? People also have found that the water from fracking carries unacceptable amounts of radiation. It makes streams and rivers radioactive. What if ISDS makes it so they cant turn the fracking off.
Some of all this is about jobs.
To get those statuses in those other countries, ("National treatment", "Most favored nation" etc.) they have fallen into a trap of job trading, or they claim they have, some claim they have to agree to give away more jobs. (Whether the US agreed to give away lotsof jobs in the WTO services agreement is actually a subject of great dispute. Some countries (a group of developing countries led by India) claim we did, while US trade experts claim that only if the whole deal is completed, the so called 'single undertaking' would those promises of market access - allowing an unlimited number of intra-corporate transfers, instead of the quotas that limits the numbers to a fraction of its potential. (This "Mode Four" would expressly not be immigration, as its temporary, and only for economic reasons, they feel that with their low wage advantage, they can do the work for much less, pay their workers as much or more as they make at home, or even a national minimum wage in the wealthy countries, and still make a profit.) Plus developed countries could save a lot of money on education, currently they must educate their own people at tremendous cost.
These provisions aren't for just anybody. They apply only to people with special skills, such as computers and related services (CRS) , or construction, or teaching, or nursing, or medicine, or engineering, they may require a degree, and if they become an entitlement, it wont be one enjoyed by individuals, it will be extended to the companies that are transacting the business for their use. Employees will be tied to their employers. They wont be able to switch jobs.
Right now in the US and likely also Canada, energy related jobs pay fairly well, compared to other jobs available to people without an expensive education. But not in the Middle East. There they use the 'kafala' model. Which is more like indentured servitude.
The deals would put into place a model much like the Middle Eastern kafala model in big sections of the economy, allowing dramatic shifts in labor. Public sector jobs especially, jobs that in many communities are the best and sometimes even the only jobs they have, would change towards privatization and subcontracting with international competition for those contracts. Whomever bid the cheapest would win.
The energy industry would become mostly foreign subcontractors (This has been one of the big aims for a long time because it allows the big companies to shed risks like the risks from huge environmental disasters to subcontractor companies which really means pass the costs to the countries and their taxpayers.)
So then the countries wont even get the jobs any more. Just the cleanup costs. But lots of insider investors likely would get huge payoffs on their investments. Despite the fact that fracking is kind of the extraction of the last natural gas and petroleum resource, a resource that by many accounts has almost run out. (There is a lot of evidence that its been vastly overstated, there clearly isnt even remotely near as much as they claim. What does exist is not worth getting out, unless wages fall a lot to get it. But at what cost? because wells could be fouled and people made ill-
fracking impacts peoples health, particularly children and the unborn, and the old.
Speaking generally - Governments are very worried about many jobs going away for good. Which is the greatest challenge the human race has ever faced. Who is going to pay for everything? What are we going to do to organize this transition?
I think this is getting a bit off-topic, but you're still raising an interesting concern here.
Yes we all know many jobs are going away progressively due to many factors including automation, technological changes, societal changes, etc.
The way states are currently working to feed themselves and redistribute wealth will have to change drastically. The current trend in most countries is to lower taxes for companies (in the name of competitivity and the 'employment blackmail') and increase them for individuals. As less and less individuals will have jobs, even if we assume that the overall economy allows to support them, governments will inevitably have to raise company taxation, up to a point that may end up in a global crash.
Fun days ahead.
You are assuming that governments will have a burden they may not have of a social safety net which they are shifting to the private sector. Instead of expensive domestic services, international trade will become the method of solving cost problems. Whatever costs exist, those services are likely much cheaper in some currently isolated area of the world. E-commerce will enable jobs and hospital beds and patients, and energy, kidneys, and even "gestational carriers" (women who carry other womens babies to term in their own wombs) to be traded in spot markets like hotel rooms, prison cell space and airline tickets are today.
As Ronald Reagan used to say, "The magic of the marketplace". E-commerce is the balm that heals all, according to the free trade advocates. Don't worry jobs will vanish. Ecommerce! say it a few times.. "Ecommerce". The new "better than solar" information roadways to El Dorado.