Why does WordPress change a file’s permissions?

Per the link provided in my comment to your question, if you wish to prevent the editing of files by WordPress, just disable the file editor.

To do that add the following to your site’s wp-config.php file:

define('DISALLOW_FILE_EDIT',true);

Or to disable the file editor and the plugin and theme installation/update system:

define('DISALLOW_FILE_MODS',true);