I remember reading a study on source code quality quite some years ago, maybe it was featured on Slashdot. The result was that the lowest quality and the highest quality source code was proprietary, open source code was "pretty good but not the best". And that high quality proprietary code was stuff like operating system kernels and network equipment firmware, not business applications.
That makes sense.
Open source OSes, for example, seem to be pretty high quality, at least with regard to general purpose OSes. In general open source application code seems pretty good too.
On the other hand there are highly regulated or safety critical fields or where uptime is mission critical where people are very motivated to produce high quality code and a lot of that is proprietary.
I hope people are not vibe coding that type of code!