I am speaking of knowledge conserning how the Unreal Engine is built, not on engines in general. But yes, building an engine, would indeed be a great educational experince.
Most people, however, choose Unity or UE4 because they either lack the time or competance needed for such an undertaking