I think you're confusing it with personal projects.
There is nuance in that statement. The IRS has a test for whether a person is an employee or a contractor.
https://www.irs.gov/newsroom/understanding-employee-vs-contr...
I think you're confusing it with personal projects.