WordPress looks for signs of version control, such as a .git or .svn folder, in the relevant directory and its parents. If it finds one, it assumes updates are managed through the repository and avoids overwriting files automatically.

This is sensible for developer workflows, but a leftover repository folder on a production server can quietly stop automatic updates. The filter lets code change that detection result.

If automatic updates are not working, look for version control folders on the server. Also make sure such folders cannot be downloaded through the web server, because they can expose source code and configuration history.