Query generation is a very tricky part of the code. Everything is generic and built on the fly, using the field names from the base modules and all the possible customizations from Studio etc. So it’s not immediately obvious where that part of the query is being generated, and it would take a serious amount of time to investigate.
If you’re a PHP developer and you’re working with an IDE and a debugger, it shouldn’t be too hard, but in other cases…