Why should I submit a piece of code to Unreal?

For example: If I had an own engine running since 2010(to make a clear case: my engine was published before the UE4) and want to submit a piece of marvelous code that I’ve used there to Unreal, does that mean that my engine and all its publications in any form (some decent games maybe) would become a part of the Unreal Engine EULA and I have to pay revenue on these publications? If yes, then why should I submit a piece of code to Unreal? You may want to overthink this thing, don’t you?

The intention is that if you fix something in the engine then they can use the fix. If you create a new feature, then you should try and work with Epic to have them pay you for it if they want to officially integrate it into the engine. You would then have to agree on terms for that.

If you have the whole engine written from scratch, and it does not use unreal engine at all, then you don’t get anything from submitting it to epic games. You’d just pretty much gift it to them, and there’s no reason for you to do so. The reasonable course of action in that case would be to try to sell your code.

If you implemented a fix, that the point is that you submit the fix to upstream repository so somebody (who is not you) hopefully will babysit your change and ensure it keeps working with each new engine version.

Surrendering rights to the code upon submission is fairly common practice for dual-licensed and even opensource projects, by the way.

In this given situation I would not want to receive money from Epic, but want to know if my engine would be falling under the Unreal Engine 4 EULA as it is stated in the FAQ-cite.