So I work at a big AAA company that maintains a few big AAA engines(I'm sure you can guess which one it is), and while there are loads of drawbacks, the benefits are worth it for us. Basically it boils down to - we control the engine, we control the release schedule for features, we don't need to wait for permissions or licences from another company, and there is no risk of being screwed over by a changing cost or licence restrictions.
As an example - right now as next-gen consoles are slowly heading towards release, we need to have several games ready for launch. If we relied on external companies to provide say PS5 support, this might have not alligned with our schedules and company goals. In fact, since different projects are in different stages of development, things like PS5 support have been developed independently by few different teams for different engines. This might seem wasteful on the outside, but in fact that allows us to pick the best implementation afterwards, or the best implementation for the genre of the game that we're building. We've done the same with the Switch when it first came out - multiple implementations appeared on different projects but nowadays there's only one or two that are considered "gold standard" within the company. You don't get this flexibility with external engines - you get one implementation, and it either works for you or it doesn't. You can make a request to change something, but it might or might not happen, and you usually don't know the timescale. With your own engine you control the timescale.
>> I imagine that Unreal is more advanced than these homegrown engines
Uhm no, it is and it isn't. Unreal as a commercial product has to serve many many goals, which means that for some it's just not the best engine to use. With your own engine you can tailor it to exactly the type of game or the system you're building for and achieve maximum benefit.
>>Ps: Doom Eternal runs really great, but I'm sure with tuning Unreal can produce similar results
Like, maybe Epic could do this internally. As an outside studio you have 0 chance of doing the same.