You sidestepped the topic of “open source apps have bad UI/UX by default”, that’s just not true. I agree that GIMP has pretty bad UX, there’s no questioning it, it also has a long history and that means technical debt when devs don’t work on it very consistently, the Photopea dev got to start anew so they could skip working on old code. I think we also underestimate that the widespread availability of clear UI and UX guidelines in recent years that came with the emergence of new platforms like Material for Android initially and then all other platforms subsequently, helps a lot in shaping how non-designers can imagine the layout of their software.
The project is also important to their livelihood (since it is commercial) so the dev will put all their effort into making it better.
This is meant more as an explanation rather than an excuse of course, but it’s also to say that yeah, maybe if one of us wanted they could make the next cross platform Photoshop, but they need the skill, the time and the incentive to work on it. Plenty of free software manages to have a good interface even without being commercial, but when the type of things they try to achieve is a very big undertaking you can see that most glaring examples have the money going in it (Blender), others survive on being simpler, being born later, having more dedicated developers that maybe get to work on a new exciting/pleasant language etc.
There are certainly exceptions to the rule, but you really do notice it. Another interesting example is Thunderbird that for so long has remained stagnant with its aging UI/UX rules (some might think they were always better, I guess that’s up for debate) and now after painstaking work to modernize the code they were successful in also modernizing the interface quite a bit.