The IJN carriers lacked sufficient AA coverage. The carriers themselves carried more AA weaponry then they're own plane gard destroyers could. The starboard AA batteries had very limited arcs of fire where as the bridge and the flight decks were concerned. The galleries were also located below the flight decks outboard ergo not being able to fire across the deck and making them take radical turns in order to unmask the galleries themselves while making an easier target for multiple bombing/torpedo runs. By allowing their CAPS to be lured from the home carriers they set themselves up for the damage they incurred.
In addition IJN doctrine for the carriers control relied heavily on radical looping turns to avoid damage however as certain books state it may have worked well for "green" pilots but certainly not against an "A" team attack especially for the older and slower carriers such as Kaga.