As a software engineer, there are legal protections, both in explicit contracts with my employer and things like trade secret and copyright law that prohibit me from, selling proprietary information I have access to to competitors, or using it to start my own company, etc. There are also contractual terms prohibiting various conflicts of interest, such as owning a significant amount of shares in a competitor.