I know not a thing about Java, but I know that if you create a game, everyone has access to the source code because you can open .jar files with Winrar (or any other program that opens rar files) and you would be able to see and edit the source code. I do not think that happens with C# or other languages.
That is the case with many languages and with nearly all modern languages.
Under the very old C and C++ compilation model, which has its roots in the 1950s and 1960s, the design was to eliminate everything that could be eliminated which makes decompiling and reverse engineering much harder.
If you need to make things harder for someone decode, you can use tools to compile to a final optimized executable while stripping reflection information, or you can look to obfuscators that rename everything to less-understandable names.