Yea, but most advertisers come only after something went viral, not when you are building something and you try to say to potential advertiser: "this will go viral trust me bro". And such small viral things are usually short lived, by the time the advertisers come it will probably starts to die down.
But yea, maybe he would have got a little more financial support than donations even if he puts up ads after it went viral.
Another way he could benefit from this is when people want his skills to build them similar things, so it's basically already an advertisement for his skills.