Very small positive externality at the expense of their customers. Probably doesn’t even come close to balancing out.
Besides, if they were genuinely interested in positive externalities they would be spending the money lobbying for a ransomware payments ban and not donating to universities.