Why do I not have permission to use script containing frappe.db.sql?

I followed up with some personal commentary and investigatory questions on this subject:
https://discuss.frappe.io/t/suspicious-use-of-sql-parsing-as-a-security-feature-for-db-access/91150