I know 2 SWE in the company who actually discussed this with their managers and got okay in writing for their consulting businesses.
EDIT: Really curious if SWE actually read their contracts or they just assume that they are not allowed. I don't remember my contracts from earlier jobs. It would be interesting if we can have a site like levels.fyi for contracts.
I was surprised when I discovered the permissive nature of my company, but I've never seen it be a problem for anybody.
At the same time, so long as you get your work done, most companies aren't going to object to your (mostly) nights and weekends hobby business or getting a degree (assuming you've worked out the details with your management).
However, in the US “at-will” employment is the norm, which means either party can terminate the employment at any time for any reason, or no reason. If the employer finds out an employee is moonlighting or freelancing in their spare time they can simply fire the person, and cite violation of policy or give almost any reason that isn’t illegal. The contract would only matter if the case got into court, and that’s unlikely to happen since the employee has no right to a job in the first place.