'Why' is easy to state for things like this. 'How' is a lot more work.
Also, given that w3schools is a non-profit, why not just help them. Yes, they have adverts, however they state that their aim is to always have everything on the site freely available, rather than a business plan of "Actually, I hope to make a living by selling high quality video tutorials", which leads to perverse incentives to keep the quality of the free stuff low, to stop it from outcompeting the paid stuff.
As far as I can tell, W3Schools is not a company, it is a project by a commercial company. That means they’re not tax exempt and any donations made to them can’t be written off. The company may not make any profit from the project now, but it’s unclear whether that’s by choice. Blackberry doesn’t make any profit, but that doesn’t make them a non-profit.
Also, given that w3schools is a non-profit, why not just help them. Yes, they have adverts, however they state that their aim is to always have everything on the site freely available, rather than a business plan of "Actually, I hope to make a living by selling high quality video tutorials", which leads to perverse incentives to keep the quality of the free stuff low, to stop it from outcompeting the paid stuff.