Windows NT? The Windows 95-98-Me series' kernel was thrown in the bin, replaced by the NT kernel when they released Windows XP.
They wrote a new system in tandem with maintaining the old one and when it was mature enough, swapped out old for new. This pattern is very commonplace.
They were two different products that ended up converging enough that sharing code made sense.