There are two levels to be aware of here, the technical and the practical.
Technically, yes, the company would like to be able to claim ownership of anything you write while you're employed there. One of the problems with employing people like developers is that a lot of what you're paying for are ideas and ideas don't reliably show up just during business hours while the employee is sitting in the office. If you're employed by, say, a hardware vendor writing code to manage a SAN and you happen to have a brilliant idea at 2am on a Saturday morning for a better way to deal with compression in the SAN, the company doesn't want to go off on your own to patent/ implement it and then sell the idea back to the company. Trying to come up with workable definitions of what ideas might compete with the company you're working for and what ideas you're free to develop on your own-- particularly where that company is very large with lots of groups doing lots of different things-- is pretty challenging. So it's not uncommon that the employer wants the ability to claim very broad ownership. Similarly, the company generally wants the very broad ability to determine what might detract from or overlap with your duties because those things are generally hard to define in advance.
But that's where the practical side comes in. Sure, the company might technically be able to make broad claims. But practically, they generally have no interest in ticking off a productive employee over something that obviously does not compete with the company. If you're contributing to an open source role-playing game while employed at the hardware vendor, it is exceptionally unlikely that anyone would bat an eye unless you started coming in late because you're spending all your time working on the game. If at some point your company decided that a particular extracurricular activity was getting too close to your actual duties, they would realistically tell you that they'd like you to stop contributing to that particular project. For most people, that would be a disappointing conversation but it would be an easy decision to abandon the open source project in favor of your regular day job.
You have to figure out how comfortable you are with the ambiguity between the practical and the technical. If you want to start your own company that might tangentially compete with your current employer, for example, it's almost certainly worthwhile to talk with a lawyer to draft an amendment to the contract that gives you the rights to certain ideas that you might have during your employment. If your day job is just to pay the bills but your real passion is a particular open source project that you care about, it makes sense to amend the contract to specifically exclude that project. If you just want the option to occasionally contribute code to projects you find interesting or to be able to publish personal projects from time to time, it may be perfectly reasonable to accept that your employer might have the ability to claim ownership of some of that code but it would never be worthwhile for them to do so.