WARNING: The following contains spoilers for Season 5, Episode 19 of My Hero Academia, "More of a Hero Than Anyone," now streaming on Funimation, Crunchyroll and Hulu.
In My Hero Academia Season 5, Episode 19, Shota Aizawa and Present Mic visit the ultra-secure Tartarus prison to interrogate the prisoner Kurogiri, one of the most prominent inmates aside from All For One himself. During this, a brief flashback in "More of a Hero Than Anyone" sheds light into why All For One and his minions attack the U.A. school in particular, and the reason is shockingly straightforward.
The League of Villains boldly attacked U.A. in My Hero Academia Season 1, prompting tighter security measures, especially during the school festival, when Gentle Criminal was on the loose. However, no matter the security, U.A. will always be an inviting target for All For One because, for him, the school is a Quirk farm, ripe for harvest.
All For One explains in a brief flashback that the U.A. school is an ideal target not just to spite superheroes and All Might, but to also harvest the Quirks of the students enrolled there. Potentially, All For One can steal nearly anybody's Quirk, but only certain Quirks appeal to him, and only the most talented boys and girls gifted with remarkable Quirks are admitted into U.A.'s hero progrom. This concentrates a few hundred powerful Quirks into one area, and the adolescent students are not yet pro heroes and cannot easily defend themselves from villains like All For One and Tomura Shigaraki.
U.A. and its students are not exactly hidden from public view, either. Everyone knows where to find this school, since the press often arrives to interview the staff, and getting inside is simply a matter of bypassing security, especially if Kurogiri is involved. Even the identity and Quirks of the school's best students are easy to learn, with events like the U.A. sports festival being widely televised for all to see. These competitions are broadcast so pro heroes can scout out students to train during internships, but members of the League of Villains can also watch these broadcasts, giving All For One a vital reference. He can plan ahead of time whose Quirks he will steal and recognize talented students at a glance should he meet them.
Flashbacks make it clear that All For One is a tireless schemer and hunter of Quirks, and he seeks to steal and grant Quirks to the masses to create thousands of loyal followers. To defend himself in the process, he needs quite a few combat-worthy Quirks, and the U.A. school is ideal for harvesting more Quirks for his collection. The paradox is that having so many talented students and teachers at U.A. makes the school better-defended, but this also gives All For One more reason to attack the school, and he stands more to gain. If AFO claimed even just a few teacher or student Quirks, he could quickly become too powerful for even All Might to stop.
If All For One would attack U.A. to steal student Quirks, he would, in theory, do the same to other hero schools too, such as the elite Shiketsu school or even Ketsubutsu. Talented students such as Inasa Yoarashi and Seiji Shishikura would make appealing targets and would merit a League assault on Shiketsu with All For One leading the charge. Paradoxically, hero schools are both the safest places from All For One and the most vulnerable.