Supplier fumes as carmakers take electric motors in-house

Why would manufacturers spend millions of dollars to develop technology that motor suppliers have had for years?