They can also still buy it for free if/when it fails
(You might say that in that case Amazon should be willing to pay enough for those parts/maintenance to make Rivian profitable, but they might be willing to pay more for an in-house department that will operate the way they want than for an external company that might waste money continuing to chase other revenue sources instead of gracefully winding down)
Rivian is worth 17 billion today, and loses a billion per year.
Buying them to support the Amazon fleet would be paying 1.7 million per van upfront, then 100k/year, just to ensure spare parts manufacturer exits.
That is one hell of a cost to avoid buying 3rd party parts.