why are some unused pins grounded via capacitors?
It would appear you have no electronics experience. Those pins are not grounded. They are decoupled. The small value capacitors are recommended on all power pins in a digital or uProcessor circuit. If you look closely, you will see the value varies from 1 uF to 10 uF depending on which pin it is on. The term "grounded" is used in electronics to denote a direct short to ground. If a component is connected between some pin and ground, the term "grounded " no longer applies. In this case the correct term is "decoupled".
One would say, "All the power pins are decoupled. Anyone with any electronics experience understands that implies "with capacitors". The speed and load on the pins determines the value of cap used. The higher the speed, the more decoupling you need to prevent negative spikes on high to low transistions.. As for the unused pins., no explanation is necessary. It is a shield and not a standalone circuit. The only use for this shield is to plug it into an arduino. If the the Wifi circuitry doesn't need to use some pin, there is no reason why it would have anything connected. Every shiled uses different pins, and none of them use all the pins. No matter what shield you buy , there will always be pins that shield doesn't use, hence the reason nothing is connected.. That question could only come from someone who has never used a shield before.