Why build the Barbel-class diesel-electric submarines while the US Navy was already moving toward nuclear boats?
Short answerThey preserved a conventional option while nuclear submarines were still developing, much as late piston-powered aircraft remained useful during the early jet transition.
NotesThe Barbel class is treated as insurance during the transition to nuclear submarines. Investment in a new propulsion system did not remove the value of finding out how far the existing conventional system could develop. The comparison is with the last generations of piston-powered aircraft, which remained useful while early jets were still unreliable. Retaining an effective conventional option reduced dependence on an immature replacement.