I started doing this a couple of years ago - defaulting to writing open source code unless I had a really good reason not to - and my productivity has gone through the roof as a direct result.
The way I think about this is that ideally as a software developer I should only ever have to solve any problem once. If I solve it by writing some open source code, and do it well, I'll never have to solve it again in the future.
I compare that to my previous decade+ of engineering where I would frequently find myself solving a problem that I'd already solved a couple of years earlier, but in closed-source code that I couldn't easily reuse.