Let's say I generate a new address and by some miracle it has Bitcoin already in it belonging to somebody else. Is it legal to just take it? I understand those odds are very low, no need to lecture me, I'm just interested.
P.S.
you would not generate a new address for yourself that is already in existence, plus you would need the 2nd miracle of figuring out the key AND if you could do that 2nd thing...
There are plenty of wallet addresses to perform that one on: pick a loaded one, and go on with your bad self ;-)