Because while the
"Ж" string may appear to contain one character in your
IDE, the Java compiler may interpret the source file using a different encoding, and the string may actually appear as a bunch of garbage characters that add up to 5 bytes when you encode it back to UTF-8.
You have 3 different encodings to consider here: The encoding your IDE uses to display the character on your screen, the encoding the compiler uses to interpret the source file, and the encoding that you tell
String.getBytes() to use. If any of these don't match, you're going to end up with surprising results.
Try this: print
"Ж".length() with and without specifying the source file encoding to your compiler, and see if the program really reports a string length of 1 character.