To be fair, even if it never gets used, it's a hedge against the risk of relying on a third party.
My last project was heavily reliant on a particular feature in a game development framework. We were more than 1 million into development when they announced they were discontinuing the feature. We had a service contract, but not a maintenance contract. They basically told us at that time that all those bugs we had filed over the last 6 months? Here's the code, fix them yourself. We pivoted as hard as we could, but it was too late and we had spent too much money. The end result is my company canceled the project and laid off my entire studio.
My last project was heavily reliant on a particular feature in a game development framework. We were more than 1 million into development when they announced they were discontinuing the feature. We had a service contract, but not a maintenance contract. They basically told us at that time that all those bugs we had filed over the last 6 months? Here's the code, fix them yourself. We pivoted as hard as we could, but it was too late and we had spent too much money. The end result is my company canceled the project and laid off my entire studio.