If you start working on a side gig, that will take up a chunk of your time and invariably occupy your brain; thus, your employer doesn’t get their full value out of you anymore. Up to a certain degree, employers (have) to tolerate this—in Germany, that would be when your performance at your job starts to suffer from it. But once your commitment to the side gig increases so much that you’re about to become CEO, there’s no reasonable way to claim you can still carry out your contractual duties to your employer.
If your employer then offers you to either step down from that side gig or lose your employment, that is completely reasonable and frankly something you should expect?
Put differently, if you pay me to paint your shed, and after finishing the front side I went off and painted my own house with the rest of the paint, you certainly wouldn’t consider the job done or full payment to be justified.