Sorry, I know nothing about memory editors, but why couldn't someone read both the key and value and do the bitwise operations themselves?
Most people cheat in games by scanning for known values, rescanning when they change and locating the memory addresses of these values then freezing them to a certain value.
Cheat Engine does this through the WinAPI ReadProcessMemory and WriteProcessMemory which scans your games virtual memory into a buffer, repeatedly compares it to the search value and listing all memory addresses that match.
What this code will do is prevent memory scanners from easily being able to locate the value in memory, thus effectively preventing most noob cheaters from being able to find and modify the value in memory. Its just a thing you can add to prevent noobs from easily hacking your game, but it wont stop determined cheaters, they have full control over the system and can do things like patching java.util.Random, modifying the Java ASM of your binary or even replacing the entire class with something different, just take it as a little thing you can add to stop noobs from getting high on your leaderboards.
I added the bit negation part to make it harder to locate the value if they did something like patch java.util.Random#nextInt to always return 0 for example.