If you do a careful comparison you will notice that the wd-40 will cause your chain to squeak faster than most chain lubes. It will also wash out the grease in your freewheel/hub and cables rear derailleur etc. if you get too much in there. It is good for many, many things. But a chain lube or oil is better for your chain.
And yes you can wear out the chain and just get a new one, that works. But if you get too much WD-40 around the free hub/wheel and axle bearings you can easily ruin something more expensive than a chain. Be careful.