When you finish a Master's degree, you realize you know nothing.
When you finish a PhD, you realize nobody else knows anything, either.
But it is important to remember what you are doing. In a PhD you should be pushing the boundary of knowledge. As a programmer in a company, you should be solving problems to generate value for your customer and your company.
If you aren't doing these things, you are in the wrong place.
You don't need to get a phd to push the boundaries of knowledge, and often people who get phds aren't actually doing that. PhD is just a fake status indicator like an MBA.
A lot of work that generates real value is also pushing the boundaries of science. Good scientific work often has real world impact.
I noticed you used "programmer" to refer to the person working in a company, but programming is also an essential skill for pushing the boundaries in just about any field now. Many "scientists" are not capable of it and look upon it as grunt work, which says a lot about their true competence.