Employment contract is a contract and usually it's fixed hours per workday for a salary. So basically you as employee swap X hours per Y amount of money.
If one of the parties is in breach of that contract it's normal it to be dissolved. If you don't want to work, you don't need to sign that contract.
The really moral part of free market economy is that both parties are voluntary entering a contract. You as a person sell your skilled time, the company buys your skilled time. If you have super unique skills, like Andrej Karpathy you sell something on the market that is very valuable and you have the upper hand.
If you know "Microsoft Excel" I'd bet there are many people (or AI agents) that will do the same and what you're selling can be bought in many places (and time zones).
Basic microeconomics... In a free market you need to do something for the others to have something for you. And if it's not useful, they won't pay you for that.