In my case there was nothing else out there doing that sort of thing at the time, so I though what I had created for a fun project might be useful to others and turned it in to an open source module.
I would caution about creating your own framework for client projects, this creates some risk to them that they will not be able to find other developers who can maintain or add new features to their site / product if you are no longer available.
Many years ago I worked for a web development agency who created their own CMS framework and one of the clients with a site still on it can't find anyone who wants to work on the codebase to make changes the client needs to one of the calculation tools.
Fortunately I am still around and willing to make the changes, but I'm 1 of only about 2 people in the entire world who understands how the thing works. Also great that the client is finally considering a rebuild of the tool in a modern framework.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.