Detroit also got whacked by other countries becoming players in American auto sales, similar to how Rochester, NY's decline accelerated when Kodak shit the bed. It's very common for a city that's reliant on a certain industry to go to shit when the industry in question goes to shit. Expect the same to happen to Silicon Valley if other regions start to set up large tech firms.
That said, the decline of certain American cities is ultimately a result of a multitude of factors, with no single one being the entire reason for said decline.