WD-40 is not straight oil, it also has other volatile chemicals that make it penetrate deeper and quicker than pure oil. When the other chemicals evaporate it leaves a sticky gunky film that attracts dust and dirt.
Sewing machine oil, air tool oil, electric motor bearing oil, are all high quality oil you can use on fan bearings. If a fan starts to get noisy the bearings are already shot and you need a new fan. The oil will extend its life so it won't freeze up, but it will never be as quiet as when new. If a new fan has noisy bearings, oil it, then replace it soon.