Most of the articles that trash this trade and lot of the talking heads keep talking about all the money tied up into a few players. And on paper - with the current cap it does seem that way. But in a year or 2 it might not look like that at all. In 2 or 3 years we might look at Goff's contract as a very good deal.
Next year Whitworth and Talib are off the books. Possibly Fowler, but I'm not so sure about this one. Quality pass rushers are hard to find. They don't have to worry about Peter's deal.
In 2 years - Matthews and Weddle will be gone.
Also in 2 years you'll probably be at the end of the Gurley deal, and Goff and Donald's deals can always be re-worked to create cap space. Brady and the Pats have done this several times.