Some things not taken into consideration:
1. Those who are able to make their own engine likely have the resources or knowledge or both to make a decent game. A custom engine is a byproduct, not the reason.
2. Everyone going to unreal is a recent development and at the start there was no good documentation or learning resources.
3. Fortnite is one of the biggest games of all time, and it's in Unreal.
It's also worth noting for 2D games, almost everybody serious uses custom game engines including 1-2 people dev teams.
3D games don't get that because they're that much harder to develop.
3D game engines are also a very long term investment. That is why EA tried to get everyone internally to move to Frostbite instead of each studio using their own engine.
You are looking at correlation, not causation imo.