Cave spiders (of the normal and giant variety) cannot swim, but they are potent climbers. Climbing can be done along the sides of any non-smoothed wall. A skilled climber has but a small chance to fall off while climbing alongside a wall. Thus, a long climbing section as the only entrance to the fort can be an effective way of dealing with goblin sieges.
Climbers cannot climb along a ceiling, or climb over an overhanging floor tile. However, they can climb alongside the bottom of Tree branches, and can also move diagonally (up to 1 tile in each of the x-, y-, and z- directions).
Thus, it is possible that at some point in time a giant cave spider might have wandered along the side of the cavern wall in order to reach such an island.
If your region contains one or more 'web-spinning' creatures by default (the game maintains a database of which creatures are present in every biome region) then worldgen will also spawn some appropriate webs inside of the caverns. These may be in locations currently unreachable by some or several of these creatures.
Forgotten beasts have random attributes. Thus, a Forgotten Beast that can both swim or fly and excretes webbing might drop webs in locations unreachable by cave spiders. The type of webbing they excrete is also generated randomly, so a 'spider' type forgotten beast that can fly might generate 'giant cave spider silk'.
Underground water height level can be modified, due to both your actions and natural developments. E.g. a fortress situated near a cliff-side where an underground water source surfaces in a periodically [dry biome] might have varying water levels throughout the year in its caverns, as the water drains away during the dry season to be filled back up during the wet season. Dwarven engineering projects might have raised the water level from its original, stranding giant cave spiders on small islands. These cave spiders would starve and leave webs; a small island does not provide enough food to support one.