I saw this topic on Reddit/Bitcoin, and got curious if this ever happened on anyone. What actually will they do? Or does this kind of scenario implicate some lawful violations. Considering that someone didnt use any sort of unlawful stuff like knocking on someone door and forced to give a private key and steal it.
Lets just say a dormant wallet for a long time and someone luckily guess the keys.
First of all, I would say the probability of this happening is at a flat 0%, and this is because never have I heard or read anywhere that someone correctly guessed the private key to a wallet that contained bitcoins.
And I honestly do not like discussing things or matters that are unlikely to happen, but since I am already here and do find the topic rather interesting, what I would say is..
If I find myself in such a situation,
how I hate wishful thinking 
what I would do is move the funds to a separate wallet and wait to see if any one would complain about losing the bitcoins, if that happens, I would happily give the funds back while I beg the owner to allow me keep a small share 🙈.
Reason I would move the bitcoins to a separate wallet is, if I could correctly guess the private key to the wallet, there is a high chance another person could as well be able to guess it and who knows, that other person may not return the bitcoins if he or she lays hold of it first.