While I can't say for the Gotland case, but for the Song sub. The Kitty Hawk carrier in question had not been deployed with an active full ASW screen as it was merely conduction naval aviation exercise and transiting through the area.
More soever, military exercises are almost always conducted with the deck stacked heavily against the participants, with the opponents having almost nearly every advantage. That was how it goes for Red Flag/Blue Flag, that was how it goes for OPFOR training. So I for one will not be surprise if it is the same for the Gotland exercise.
SSK's have the advantage of quiteness that is true, but when the battle field stretches beyond that of the first island chain. The PLAN will quickly find them to be quite short legged. Consider a situation in which the US blockades the Malacca Strait from the Indian Ocean side as well as the Gwadar Port before China can deploy an effective enough force or that China simply could not delegate such forces to guard it's periphery ( yes I know that many would jump on all the other if's ands or buts, but let's just limit the scenario to this particular setup), the PLAN SSK force would find itself in a pretty pickle as it would not have the range or the duration to conduct ASW and ASuW operations against US forces. US SSNs on the other hand can remain the area for months maybe even uptill a year, picking off whatever valuable shipping they can find.
That is why China would still need a fleet of SSN to venture beyond the SSK fleet.