ORMs are useful though for a different reason. They let you creat typed objects then generate the schema from them and automatically create a lot of boilerplate SQL for you.
Admittedly for anything more than 1-2 joins you are better off hand crafting the SQL. But that is the exception not the rule.
Refactoring DB changes becomes easier, you have a history of migrations for free, DDL generation for free.
In the early 2000 I worked where people handcrafted SQL for every little query for 100 tables and yeah you end up with inconsistent APIs and bugs that are eliminated by code generation / meta programming done by ORMs.
Admittedly for anything more than 1-2 joins you are better off hand crafting the SQL. But that is the exception not the rule.
Refactoring DB changes becomes easier, you have a history of migrations for free, DDL generation for free.
In the early 2000 I worked where people handcrafted SQL for every little query for 100 tables and yeah you end up with inconsistent APIs and bugs that are eliminated by code generation / meta programming done by ORMs.