How WordPress is able to change locale without using setlocale

I would question “obviously” here. I get rather cryptic string C as result on my Windows machine.

Since WP isn’t actually using native PHP functionality for any localization and handles it via core code, my best guess would be that is coming from server configuration in your case.