SQL is a poor excuse for a data retrieval API, most programmers treat SQL as strings, and that's why SQL injection is still a huge cybersecurity problem in current year. SQL generators / ORMs are the way forward, so people should stop complaining about them and help improve them.
Also: SQL is a leaky abstraction for on-disk data structures and most software engineers would be happier working with a query plan level API--working in terms of B-tree lookups, sequential scans, nested loop joins, hash table aggregations, etc.