It is just a manner of fact that companies reserve their right to fire people to work for them with little to no excuse, and that is something we must live with, at least until there are changes of laws.
Yup, that's the life of being employed. We can be removed anytime the management wishes to. With politics or not, with something good or bad that an employee did, always think that they have the rights to do whatever they want to retain or remove an employee. But on this case, they all have the right to impose that rule because that's not right at all for an employee to do something inside working hours that's not in line with company's business.
One of the risks when you are really just that depending into a single source of income or having that day job is that you can possibly be kicked out or laid off because of those common reasons. As much as possible you will really be needing to have that multiple source as much as you could even if its hard but at least you are doing your best on trying to make your living way more better. Just be sure that you will really be obeying companies rules and policies and as much as possible on trying out to avoid on things on which you do seem that it will really be able to affect your work and possible that being removed due to some reasons.
You won't be kicked unless you do something crazy inside your duty and the company's premises. But that's true that this is one of the risks of having one job, we saw this when the pandemic happened and no one can skip that. And that's why if it's a life lesson, get as much source of income as you can and while you can.
A company never fires someone when it needs them to manage his business, but if he is involved in any work or does any work that is likely to lead to the company's loss or for some reason the organization fears any loss from that person, then he will definitely not be kept there. And yes most private job there is no guarantee, so one should be careful in the jobs there and definitely should not do anything outside the rules.
I will not keep any employee in my personal organization who can harm me. Therefore, if I can predict that in advance, then I will definitely fire that employee as soon as possible if that is so harmful. Because I will not want to keep someone like that with spending money.
Employees are really that easily to be replaced and we do know all of that on which it is really that easy to find someone who do replace if ever there's a vacant but there's indeed a point that if you are a worker whose really that having that high position and having skills then it will be that not ideal for the company on firing you up not unless if there are some serious misconduct or disobedience or other correlated things happen then it might pushed through but if the issues been raised were really that minimal or not something major then they might really be just that giving you some warning and wont be making out some direct decision on firing you up. This will really be that on case to case basis into this aspect.