What kind of a stupid question is that? Stealing is the root word here. I never knew stealing something would be legal. Maybe nobody would give a fck if you Steal some shit which doesn't hold a value, but bitcoin do hold a value. And stealing is stealing. No matter what you steal, it is wrong.
It says that you don't mean to steal it and it was just an accident when you generate an address and you got the bitcoin address of someone and it has a bitcoin in it, seriously, that can't be called stealing, amount has already been there before... You are the legal owner of it if no one would claim it or if the one who own it has no proof or evidence that it is his property.