So here is my take on "Why does Open Source exist?".
My opinion is a little depressing and maybe shocking for someone. Yes, this view doesn't start with words: Open Source exists because the human race goes to a bright and happy future. No, it begins with the employee's contract.
I don't know if everyone is aware, but when you work for a company, then all code you write stays in the company. Legally you cannot use any of it in another company or for your commercial/non-commercial projects.
All your hard work, your inventions, and discoveries simply stay behind the walls of your company.
Very disappointing, I think. But this is called proprietary software. Only some information is shared on conferences and corporate blogs, but not more.
Who created the first open-source library? Let's leave the question about chicken and egg for now, and consider that you work in some company. You split your work into small tasks. And for many problems, you don't need to invent the wheel, enough to find ready-to-use libraries.
Some Open Source libraries with MIT or BSD licenses, correct? You don't have a problem doing it. Then you integrate a library, solve your task, and go home. And it repeats day after day. What if you want to leave your name in history? And also get stars on GitHub? Then you should be an author of such library!
Don't hide your work in the company. Of course, it requires some prep work. You need to remove all business logic, add README, Dockerfile, and setup CI/CD pipelines. But you will get free QA Grinning face with smiling eyes Then add the MIT license and include it in your project. Profit.
Have you tried to open source code from your company? How often do you do it? If not, think about what will you show at the future interview?