"Shitty" companies have legal obligations to include these kind of clauses though, because investors and board members don't want to deal with a situation where there's exactly this ambiguity about what counts as "obviously not-related software". HR exists to protect the company. What counts as obviously non-related to you may not count as obviously non-related to a board member who hears about the new optimization algorithm you wrote and realizes the company can monetize it.
> On the contrary, using a nonzero amount of working hours to work on something pretty clearly makes it company property.
How recently have you seen a tech employment contract where you were obligated to work exactly 8 to 5 with a 1 hour lunch break? Flexible hours means any hour is potentially a "working hour".