I believe that the issue isn't that they don't want to share, but that the code is a pile of patchwork that would need to be re-engineered before presenting it to anyone outside the company.
Unity has better marketing. The captured larger audience and thus got more content on their asset market and it has became default engine for beginners (C# seems much easier to learn than C++).
Unity is like Visual Basic of gamedev.
Large swathes of even professional programmers have now come into the industry never having had to really deal with manual memory management. (And I happen to think that's fine.)
Given that, and the rising popularity of indie/amateur games, I fail to see how one couldn't count C/C++ as a negative as far as market penetration is concerned.
Since I started from Assembler, it's hard for me to estimate how hard is C++ to some beginner. Managing memory came as a natural extension of understanding how the computer works.
> I'd attribute the ability to work with it from a managed language with a large part of its success relative to UE4.
You are probably right, but I simply cannot feel it. Thus "seems".
> Given that, and the rising popularity of indie/amateur games
I believe indie games reached their peak in 2011/2012 and got a huge drop in quality/quantity ratio since.
I regret every non-art unity asset store purchase I made. Need behavior trees pick one of 10 crappy maintained assets etc etc. Constantly felt like I needed to purchase something to fill some gap in unity or spend tons of time developing my own solution.
I don't feel that way at all in UE4.
Also, does Unity still not give you the source code? I assume they'll change this soon enough; you get the source code with ue4.
I kind of see it like blender vs maya or something. Lots of people are using blender, and it's very powerful. But industry is using Maya (because it's more powerful), and that won't change for a bit I think (good for autodesk).